All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Revell <rlrevell@joe-job.com>
To: Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	linux-kernel@gondor.apana.org.au, maxk@qualcomm.com,
	irda-users@lists.sourceforge.net,
	Linux Network Development <netdev@oss.sgi.com>,
	Alain Schroeder <alain@parkautomat.net>
Subject: Re: [PATCH] Make netif_rx_ni preempt-safe
Date: Wed, 20 Oct 2004 15:53:21 -0400	[thread overview]
Message-ID: <1098302001.2268.5.camel@krustophenia.net> (raw)
In-Reply-To: <200410202214.31791.vda@port.imtp.ilyichevsk.odessa.ua>

On Wed, 2004-10-20 at 15:14, Denis Vlasenko wrote:
> On Wednesday 20 October 2004 19:47, Lee Revell wrote:
> > On Wed, 2004-10-20 at 11:11, Denis Vlasenko wrote:
> > > 0x57 == 87 bytes is too big for inline.
> > 
> > Ugh.  So the only fix is not to inline it?
> 
> Yes.
> 
> You can make it conditionally inline/non-inline
> depending on SMP/preempt if you feel masochistic today :),
> but last time I asked davem thought that it is over the top.

I agree, not worth the trouble.  This would actually depend only on
PREEMPT and not SMP.

OK, third try.

Signed-Off-By: Lee Revell <rlrevell@joe-job.com>

--- include/linux/netdevice.h~	2004-10-20 15:51:00.000000000 -0400
+++ include/linux/netdevice.h	2004-10-20 15:51:54.000000000 -0400
@@ -694,11 +694,14 @@
 /* Post buffer to the network code from _non interrupt_ context.
  * see net/core/dev.c for netif_rx description.
  */
-static inline int netif_rx_ni(struct sk_buff *skb)
+static int netif_rx_ni(struct sk_buff *skb)
 {
-       int err = netif_rx(skb);
+       int err;
+       preempt_disable();
+       err = netif_rx(skb);
        if (softirq_pending(smp_processor_id()))
                do_softirq();
+       preempt_enable();
        return err;
 }
 



  reply	other threads:[~2004-10-20 20:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-19 23:55 [PATCH] Make netif_rx_ni preempt-safe Lee Revell
2004-10-20  0:00 ` Herbert Xu
2004-10-20  0:22   ` Lee Revell
2004-10-20 15:11     ` Denis Vlasenko
2004-10-20 16:47       ` Lee Revell
2004-10-20 19:14         ` Denis Vlasenko
2004-10-20 19:53           ` Lee Revell [this message]
2004-10-20 19:56             ` Denis Vlasenko
2004-10-20 20:25               ` Lee Revell
2004-10-20 20:32                 ` Denis Vlasenko
2004-10-21  0:15                   ` David S. Miller
2004-10-21  0:35                     ` Herbert Xu
2004-10-21  4:58                       ` David S. Miller
2004-10-20 19:55       ` Denis Vlasenko
2004-10-20 20:32         ` Lee Revell

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=1098302001.2268.5.camel@krustophenia.net \
    --to=rlrevell@joe-job.com \
    --cc=akpm@osdl.org \
    --cc=alain@parkautomat.net \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=irda-users@lists.sourceforge.net \
    --cc=linux-kernel@gondor.apana.org.au \
    --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.