All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: Roger Larsson <roger.larsson@e-gatan.se>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Robert Love <rml@tech9.net>
Subject: Re: PROBLEM: in_atomic() misuse all over the place
Date: Wed, 4 Feb 2009 17:17:52 +0100	[thread overview]
Message-ID: <20090204161751.GC1218@ucw.cz> (raw)
In-Reply-To: <200901280010.37633.roger.larsson@e-gatan.se>

On Wed 2009-01-28 00:10:37, Roger Larsson wrote:
> (resent, non html)
> 
> [1.] One line summary of the problem:    
> in_atomic() is used to select path of execution, most likely to suppress 
> warning logs when running a preemptive kernel.
> 
> [2.] Full description of the problem/report:
> 
> The problem is that in_atomic() only works on preemptive kernels...
> 
> Result: preemptive kernel warns about a potential deadlock in all kernels,
> developer silence with the help of in_atomic()
> bug remains in SMP/UP kernels...

I guess in_atomic() should be renamed to
unreliable_in_atomic... because it does not really reliably tell you
if you are in atomic section or not.

Or we could negate the logic and call it maybe_kernel_context()?

gfp_any() also needs a better
name. pick_right_gfp_if_you_are_in_kernel_or_softirq_context() sounds
suitable :-).

								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

      parent reply	other threads:[~2009-02-05 15:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-27 23:10 PROBLEM: in_atomic() misuse all over the place Roger Larsson
2009-01-28  0:12 ` Robert Hancock
2009-01-31 11:45   ` Joerg Roedel
2009-01-28 12:18 ` Andi Kleen
2009-01-31  0:03   ` Andrew Morton
2009-01-31  5:55     ` Andi Kleen
2009-01-31  5:49       ` Andrew Morton
2009-01-31  8:48         ` David Miller
2009-01-31  8:58           ` Andrew Morton
2009-02-04 16:17 ` Pavel Machek [this message]

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=20090204161751.GC1218@ucw.cz \
    --to=pavel@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rml@tech9.net \
    --cc=roger.larsson@e-gatan.se \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.