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:	Tue, 27 Nov 2007 11:36:42 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [patch] softlockup: do the wakeup from a hrtimer


* Andrew Morton <akpm@...ux-foundation.org> wrote:

> On Tue, 20 Nov 2007 09:46:11 +0100
> Ingo Molnar <mingo@...e.hu> wrote:
> 
> > Subject: softlockup: do the wakeup from a hrtimer
> > From: Ingo Molnar <mingo@...e.hu>
> > 
> > David Miller reported soft lockup false-positives that trigger on NOHZ 
> > due to CPUs idling for more than 10 seconds.
> > 
> > The solution is to drive the wakeup of the watchdog threads not from the 
> > timer tick (which has no guaranteed frequency), but from the watchdog 
> > tasks themselves.
> > 
> > http://bugzilla.kernel.org/show_bug.cgi?id=9409
> > 
> > Reported-by: David Miller <davem@...emloft.net>
> > Signed-off-by: Ingo Molnar <mingo@...e.hu>
> > ---
> >  kernel/softlockup.c |    6 +-----
> >  1 file changed, 1 insertion(+), 5 deletions(-)
> > 
> > Index: linux/kernel/softlockup.c
> > ===================================================================
> > --- linux.orig/kernel/softlockup.c
> > +++ linux/kernel/softlockup.c
> > @@ -100,10 +100,6 @@ void softlockup_tick(void)
> >  
> >  	now = get_timestamp(this_cpu);
> >  
> > -	/* Wake up the high-prio watchdog task every second: */
> > -	if (now > (touch_timestamp + 1))
> > -		wake_up_process(per_cpu(watchdog_task, this_cpu));
> > -
> >  	/* Warn about unreasonable 10+ seconds delays: */
> >  	if (now <= (touch_timestamp + softlockup_thresh))
> >  		return;
> > @@ -141,7 +137,7 @@ static int watchdog(void *__bind_cpu)
> >  	while (!kthread_should_stop()) {
> >  		set_current_state(TASK_INTERRUPTIBLE);
> >  		touch_softlockup_watchdog();
> > -		schedule();
> > +		msleep(1000);
> >  	}
> >  
> >  	return 0;
> 
> I think you wanted msleep_interruptible() there to avoid contributing to
> load average?
> 
> The set_current_state() can go away.

these can be fixed, but:

> This will introduce an up-to-one-second delay in responding to 
> kthread_should_stop().  Is that bad?

grumble, it's bad. I guess David is right that this should be fixed the 
right way ;-) So the above patch cannot go in.

	Ingo
-
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