From: Lee Revell <rlrevell@joe-job.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: herbert@gondor.apana.org.au, vda@port.imtp.ilyichevsk.odessa.ua,
Linux Network Development <netdev@oss.sgi.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
maxk@qualcomm.com, irda-users@lists.sourceforge.net
Subject: Re: tun.c patch to fix "smp_processor_id() in preemptible code"
Date: Tue, 19 Oct 2004 18:42:11 -0400 [thread overview]
Message-ID: <1098225729.23628.2.camel@krustophenia.net> (raw)
In-Reply-To: <20041019153308.488d34c1.davem@davemloft.net>
On Tue, 2004-10-19 at 18:33, David S. Miller wrote:
> On Tue, 19 Oct 2004 18:10:58 -0400
> Lee Revell <rlrevell@joe-job.com> wrote:
>
> > /*
> > * Since receiving is always initiated from a tasklet (in iucv.c),
> > * we must use netif_rx_ni() instead of netif_rx()
> > */
> >
> > This implies that the author thought it was a matter of correctness to
> > use netif_rx_ni vs. netif_rx. But it looks like the only difference is
> > that the former sacrifices preempt-safety for performance.
>
> You can't really delete netif_rx_ni(), so if there is a preemptability
> issue, just add the necessary preemption protection around the softirq
> checks.
>
Why not? AIUI the only valid reason to use preempt_disable/enable is in
the case of per-CPU data. This is not "real" per-CPU data, it's a
performance hack. Therefore it would be incorrect to add the preemption
protection, the fix is not to manually call do_softirq but to let the
softirq run by the normal mechanism.
Am I missing something?
Lee
next prev parent reply other threads:[~2004-10-20 6:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-15 21:43 tun.c patch to fix "smp_processor_id() in preemptible code" Alain Schroeder
2004-10-15 22:22 ` Herbert Xu
2004-10-15 22:35 ` Lee Revell
[not found] ` <200410172314.38597.vda@port.imtp.ilyichevsk.odessa.ua>
2004-10-19 18:31 ` Lee Revell
2004-10-19 21:35 ` Herbert Xu
2004-10-19 21:51 ` Lee Revell
2004-10-19 21:54 ` Herbert Xu
2004-10-19 22:10 ` Lee Revell
2004-10-19 22:33 ` David S. Miller
2004-10-19 22:42 ` Lee Revell [this message]
2004-10-19 22:42 ` David S. Miller
2004-10-19 22:51 ` Lee Revell
2004-10-20 0:44 ` David S. Miller
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=1098225729.23628.2.camel@krustophenia.net \
--to=rlrevell@joe-job.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=irda-users@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=maxk@qualcomm.com \
--cc=netdev@oss.sgi.com \
--cc=vda@port.imtp.ilyichevsk.odessa.ua \
/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.