From: Ingo Molnar <mingo@elte.hu>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: Inline local_bh_disable when TRACE_IRQFLAGS
Date: Wed, 19 Dec 2007 15:03:13 +0100 [thread overview]
Message-ID: <20071219140313.GE21282@elte.hu> (raw)
In-Reply-To: <20071219115019.GA9099@gondor.apana.org.au>
* Herbert Xu <herbert@gondor.apana.org.au> wrote:
> On Wed, Dec 19, 2007 at 12:31:52PM +0100, Ingo Molnar wrote:
> >
> > > So I'm wondering if it would be reasonable to make it out-of-line
> > > when TRACE_IRQFLAGS is off. This may make a difference because
> > > the networking stack is a frequent user of local_bh_disable and
> > > local_bh_enable.
> >
> > do you mean to make it inline again?
>
> Yes I meant in-line :)
if that decreases code size then i guess we could do that.
> > (btw., generally i think local_bh_disable() is a poor API because it
> > is opaque about the data structure dependency that it governs.
> > Explicit exclusion rules generally work better.)
>
> I see where you're coming from especially with your preemptible
> softirq work. However I'm mostly thinking about the existing callers
> of local_bh_disable in the networking stack.
yeah, i was just commenting on the general concept of 'naked'
local_bh_disable(). And just to make it clear: with that i'm not
implying anything about the quality of the networking code - networking
is one of the cleanest [if not the cleanest] subsystems in the kernel.
It's just that it's long term more useful for us if our "global scope"
APIs have direct, programmatic relationship to the data structures /
data flow they control. So i'd love to have the same flow/performance,
just coded a bit more explicitly. [preempt_disable() for example has
similar issues.]
Ingo
prev parent reply other threads:[~2007-12-19 14:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-19 3:40 Inline local_bh_disable when TRACE_IRQFLAGS Herbert Xu
2007-12-19 11:31 ` Ingo Molnar
2007-12-19 11:50 ` Herbert Xu
2007-12-19 14:03 ` Ingo Molnar [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=20071219140313.GE21282@elte.hu \
--to=mingo@elte.hu \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).