lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 12 Apr 2012 00:04:02 +0800
From:	Feng Tang <feng.tang@...el.com>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	suresh.b.siddha@...el.com, santosh.shilimkar@...com,
	linux-kernel@...r.kernel.org, johnstul@...ibm.com
Subject: Re: [PATCH] clockevents: Leave broadcast device shtudown only if
 the current device is always running.

Hi Thomas,

On Wed, Apr 11, 2012 at 12:10:59PM +0200, Thomas Gleixner wrote:
> On Wed, 11 Apr 2012, Feng Tang wrote:
> > > Problem you encountered is not related to leaving the broadcast device
> > > in shutdown mode. Problem is that we didn't track the mode change to
> > > oneshot and later during idle entry/exit, when we request the broadcast
> > > device services using CLOCK_EVT_NOTIFY_BROADCAST_ENTER etc,
> > > tick_broadcast_oneshot_control() returns with out doing much as it
> > > thinks broadcast device is in periodic mode.
> > 
> > Just curious, IIUC, the tick_broadcast_switch_to_oneshot() is only called
> > during CPU init process in boot time or bring a offlined cpu back on. Why
> > is it related to the deep idle?
> 
> Because a deep idle state might require the broadcast device and w/o
> Suresh's patch it can't use it because it's in the wrong state.
>

Thanks for the explaination, I understand the root cause now.

And regarding the original commit 77b0d60c5
    clockevents: Leave the broadcast device in shutdown mode when not needed

@@ -575,11 +575,15 @@ void tick_broadcast_switch_to_oneshot(void)
 	unsigned long flags;
 
 	raw_spin_lock_irqsave(&tick_broadcast_lock, flags);
+	if (cpumask_empty(tick_get_broadcast_mask()))
+		goto end;

  	tick_broadcast_device.mode = TICKDEV_MODE_ONESHOT;
 	bc = tick_broadcast_device.evtdev;
 	if (bc)
 		tick_broadcast_setup_oneshot(bc);
+
+end:
 	raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags);
 }
 
The tick_broadcast_switch_to_oneshot() get called mostly at boot time or
during cpu hotplug. And when it is called at boot time, the tick_broadcast_mask
is alwasys 0 at the point, thus this check is always true and skip the
following oneshot setting up for broadcast device, which sounds a little
buggy.

Thanks,
Feng

> 
> Thanks,
> 
> 	tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ