From: Arjan van de Ven <arjan@infradead.org>
To: Mikael Pettersson <mikpe@csd.uu.se>
Cc: kaos@sgi.com, linux-kernel@vger.kernel.org, mingo@elte.hu
Subject: Re: 2.6.12-rc2 in_atomic() picks up preempt_disable()
Date: Thu, 07 Apr 2005 22:17:18 +0200 [thread overview]
Message-ID: <1112905038.6290.77.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <200504071840.j37Iei25019895@harpo.it.uu.se>
On Thu, 2005-04-07 at 20:40 +0200, Mikael Pettersson wrote:
> On Thu, 07 Apr 2005 12:17:37 +0200, Arjan van de Ven wrote:
> >On Thu, 2005-04-07 at 20:10 +1000, Keith Owens wrote:
> >> 2.6.12-rc2, with CONFIG_PREEMPT and CONFIG_PREEMPT_DEBUG. The
> >> in_atomic() macro thinks that preempt_disable() indicates an atomic
> >> region so calls to __might_sleep() result in a stack trace.
> >
> >but you're not allowed to schedule when preempt is disabled!
>
> That sounds draconian. Where is that requirement stated?
>
> A preempt-disabled region ought to have the same semantics
> as in a CONFIG_PREEMPT=n kernel, and since schedule is Ok
> in the latter case it should be Ok in the former too.
>
> All that preempt_disable() should do is prevent involuntary
> schedules. But the conditional schedules introduced by may-sleep
> functions are _voluntary_, so there's no reason to forbid them.
but that implies you need to remember this after schedule. all in all it
starts to smell more and more like the local irq disable flag, and I at
least thing of it in a very similar way as well.
next prev parent reply other threads:[~2005-04-07 20:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-07 18:40 Mikael Pettersson
2005-04-07 18:59 ` Ingo Molnar
2005-04-07 20:17 ` Arjan van de Ven [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-04-07 10:10 Keith Owens
2005-04-07 10:17 ` Arjan van de Ven
2005-04-07 12:24 ` Romano Giannetti
2005-04-07 10:22 ` Andrew Morton
2005-04-07 14:54 ` 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=1112905038.6290.77.camel@laptopd505.fenrus.org \
--to=arjan@infradead.org \
--cc=kaos@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@csd.uu.se \
--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®