mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: David Miller <davem@davemloft.net>,
	linux-kernel@vger.kernel.org, gregkh@suse.de,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: regression from softlockup fix
Date: Mon, 19 Nov 2007 09:15:38 -0800	[thread overview]
Message-ID: <4741C4BA.8010905@goop.org> (raw)
In-Reply-To: <20071119094338.GA19271@elte.hu>

Ingo Molnar wrote:
> * David Miller <davem@davemloft.net> wrote:
>
>   
>> I suspect that what is happening is that the NOHZ period is longer 
>> than the softlockup timeout (10 seconds) and we get an interrupt 
>> before the watchdog thread gets onto the cpu.
>>     
>
> indeed! Does the patch below do the trick?
>
> 	Ingo
>
> --------------->
> Subject: softlockup: do the wakeup from a hrtimer
> From: Ingo Molnar <mingo@elte.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.
>   

I thought the timer code kicked the watchdog after waking up after a
long sleep anyway?  At one point I was looking into a mechanism to
temporarily disable the watchdog during a wait for a timer event, but it
got complex - and I thought - unnecessary.

Specifically this in kernel/time/timekeeping.c:

		/*
		 * When we are idle and the tick is stopped, we have to touch
		 * the watchdog as we might not schedule for a really long
		 * time. This happens on complete idle SMP systems while
		 * waiting on the login prompt. We also increment the "start of
		 * idle" jiffy stamp so the idle accounting adjustment we do
		 * when we go busy again does not account too much ticks.
		 */
		if (ts->tick_stopped) {
			touch_softlockup_watchdog();
			ts->idle_jiffies++;
		}

Or does this happen on the sleep path?  If so, wouldn't the right fix to
be this on the wakeup path?

    J

  parent reply	other threads:[~2007-11-19 17:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-19  9:21 David Miller
2007-11-19  9:43 ` Ingo Molnar
2007-11-19 11:10   ` David Miller
2007-11-19 17:15   ` Jeremy Fitzhardinge [this message]
2007-11-19 19:03     ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4741C4BA.8010905@goop.org \
    --to=jeremy@goop.org \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®