mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: linux-next: Tree for December 11
Date: Wed, 7 Jan 2009 19:47:21 +0100	[thread overview]
Message-ID: <20090107184721.GA16193@elte.hu> (raw)
In-Reply-To: <f19298770901070935u6396a367j86937c9394518877@mail.gmail.com>


* Alexey Zaytsev <alexey.zaytsev@gmail.com> wrote:

> And last time I bisected, it pointed to:
> 
> commit 7317d7b87edb41a9135e30be1ec3f7ef817c53dd
> Author: Nick Piggin <nickpiggin@yahoo.com.au>
> Date:   Tue Sep 30 20:50:27 2008 +1000
> 
>    sched: improve preempt debugging
>
> 
>    This patch helped me out with a problem I recently had....
> 
>    Basically, when the kernel lock is held, then preempt_count
> underflow does not
>    get detected until it is released which may be a long time (and arbitrarily,
>    eg at different points it may be rescheduled). If the bkl is released at
>    schedule, the resulting output is actually fairly cryptic...
> 
>    With any other lock that elevates preempt_count, it is illegal to schedule
>    under it (which would get found pretty quickly). bkl allows scheduling with
>    preempt_count elevated, which makes underflows hard to debug.
> 
>    Signed-off-by: Ingo Molnar <mingo@elte.hu>
> 
> so at least a dumb bisection won't do here.

ah, sorry for being a slow starter, i missed that bit - merge window 
attention span troubles ...

I think the kernel_locked() check added here is plain buggy against IRQ 
contexts: we drop the BKL spinlock and reduce current->kernel_depth 
non-atomically.

So kernel_locked() can become detached from the preempt_count().

Nick, can you think of any better way of still saving this debug check, or 
should we revert it?

Although it seems a bit weird how consistently you seem to be able to 
trigger it - as this seems to be a narrow race. Is there an IRQ storm 
there perhaps, or something widens things up for Qemu to inject an IRQ 
right there?

	Ingo

  reply	other threads:[~2009-01-07 18:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-11  9:04 Stephen Rothwell
2008-12-11 12:40 ` Alexey Zaytsev
2008-12-14 14:34   ` Alexey Zaytsev
2008-12-16 21:08     ` Ingo Molnar
2008-12-16 22:21       ` Alexey Zaytsev
2008-12-16 22:23         ` Ingo Molnar
2009-01-07 16:30     ` Alexey Zaytsev
2009-01-07 16:50       ` Linus Torvalds
2009-01-07 17:17         ` Ingo Molnar
2009-01-07 17:35           ` Alexey Zaytsev
2009-01-07 18:47             ` Ingo Molnar [this message]
2009-01-07 19:10               ` Alexey Zaytsev
2009-12-11  5:01 Stephen Rothwell

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=20090107184721.GA16193@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=alexey.zaytsev@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=torvalds@linux-foundation.org \
    /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®