mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Bartlomiej Zolnierkiewicz" <bzolnier@gmail.com>
To: "Ingo Molnar" <mingo@elte.hu>
Cc: "Andrew Morton" <akpm@osdl.org>,
	ce@ruault.com, linux-kernel@vger.kernel.org
Subject: Re: [patch] timer-irq-driven soft-watchdog, cleanups
Date: Fri, 17 Feb 2006 15:46:53 +0100	[thread overview]
Message-ID: <58cb370e0602170646h3d0cddo8b042eab251d9365@mail.gmail.com> (raw)
In-Reply-To: <20060217130801.GA16115@elte.hu>

On 2/17/06, Ingo Molnar <mingo@elte.hu> wrote:
>
> * Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
>
> > I'm still not 100% sure if it was false positive - it looked like from
> > the trace but I find it hard to believe that users wouldn't complain
> > about 10sec stalls [ Soft lockup detector claims to trigger if after
> > 10sec it hasn't been touched - is it really working as advertised?
> > How can we verify this? ].
>
> the watchdog is quite simple: it consists of per-CPU SCHED_FIFO prio 99
> [i.e. highest RT priority] threads that do nothing but:
>
>         while (!kthread_should_stop()) {
>                 msleep_interruptible(1000);
>                 touch_softlockup_watchdog();
>         }
>
> i can think of only one (pretty theoretical) scenario for a false
> positive here: msleep uses timers, which are processed by softirq
> context, which context itself might be delayed. Under extreme load, if
> softirqs get delayed for more than 9 seconds, this _might_ lead to false
> positives. But that i think is highly unlikely in the reported IDE
> cases.

Actually it seems very likely [ if I'm reading the code right ]: ide_intr()
IRQ handler contains "optimization" that it calls ide_do_request() for
the next request if the previous request is completed.  Processing the
next request involves waiting for device to become ready (up to 5sec)
and sending first chunk of data out in case of PIO-out protocol.
Moreover if the requests are short we can be hitting "optimization"
case few times in the row.  Hard IRQs will still have their chance to be
processed but softirq context can be delayed quite a lot as it is executed
after hard IRQ handler completes.

> in any case, the patch below gets rid of the softirq involvement, and
> makes the soft-watchdog purely timer-irq driven (and a few minor
> cleanups). Could you try it? I have tested it - it correctly detected a
> 11-seconds delay and stayed silent during a 9-seconds delay.
>
> If you still get warnings even with this patch applied, then my very
> strong suspicion is that the 10+ seconds delays in the IDE code are
> real, and not false-positives. If there are such places then the minimum
> we should do is to document them via touch_softlockup_watchdog() ...
> even if you "knew" about such places already.

Fully agreed, where is the patch?

Sorry but I have enough more high priority issues to take care of and
I'm not going to spend any more time on soft lockups even if they are
really problems in IDE subsystem.  If this is not fixed before 2.6.16
I'm submitting patch to Linus making DETECT_SOFTLOCKUP depend
on "CONFIG_IDE=n"... at least users will be able to use their systems
instead of seeing lockups.

DETECT_SOFTLOCKUP should be an aim in development not a
method of forcing driver maintainers to work on specific issues...

Thank you for understanding.

Bartlomiej

  reply	other threads:[~2006-02-17 14:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-12 18:50 [BUG] kernel 2.6.15.4: soft lockup detected on CPU#0! Charles-Edouard Ruault
2006-02-14 11:41 ` Folkert van Heusden
2006-02-14 16:32   ` Lee Revell
2006-02-15 15:07     ` Folkert van Heusden
2006-02-15 18:19       ` Lee Revell
2006-02-16  1:38         ` Alan Cox
2006-02-17 22:56           ` Lee Revell
2006-02-16  2:51 ` Andrew Morton
2006-02-16  9:44   ` Charles-Edouard Ruault
2006-02-16 10:36     ` Folkert van Heusden
2006-02-16 10:46       ` Andrew Morton
2006-02-16 11:18         ` Charles-Edouard Ruault
2006-02-16 12:57     ` Alan Cox
2006-02-16 13:33   ` Bartlomiej Zolnierkiewicz
2006-02-16 20:20     ` Andrew Morton
2006-02-17 11:47       ` Bartlomiej Zolnierkiewicz
2006-02-17 13:08         ` [patch] timer-irq-driven soft-watchdog, cleanups Ingo Molnar
2006-02-17 14:46           ` Bartlomiej Zolnierkiewicz [this message]
2006-02-17 19:52             ` Ingo Molnar
2006-02-17 20:11             ` Ingo Molnar
2006-02-17 22:15               ` Bartlomiej Zolnierkiewicz
2006-03-13 14:48                 ` Charles-Edouard Ruault

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=58cb370e0602170646h3d0cddo8b042eab251d9365@mail.gmail.com \
    --to=bzolnier@gmail.com \
    --cc=akpm@osdl.org \
    --cc=ce@ruault.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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®