| To: | Denis Vlasenko <vda@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] Make netif_rx_ni preempt-safe |
| From: | Lee Revell <rlrevell@xxxxxxxxxxx> |
| Date: | Wed, 20 Oct 2004 15:53:21 -0400 |
| Cc: | Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxx>, linux-kernel <linux-kernel@xxxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxxxxxx, maxk@xxxxxxxxxxxx, irda-users@xxxxxxxxxxxxxxxxxxxxx, Linux Network Development <netdev@xxxxxxxxxxx>, Alain Schroeder <alain@xxxxxxxxxxxxxxx> |
| In-reply-to: | <200410202214.31791.vda@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> |
| References: | <1098230132.23628.28.camel@xxxxxxxxxxxxxxxx> <200410201811.44419.vda@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <1098290858.1429.70.camel@xxxxxxxxxxxxxxxx> <200410202214.31791.vda@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
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@xxxxxxxxxxx>
--- 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;
}
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [patch 2.6.9 4/11] b44: Add MODULE_VERSION, John W. Linville |
|---|---|
| Next by Date: | Re: [PATCH] Make netif_rx_ni preempt-safe, Denis Vlasenko |
| Previous by Thread: | Re: [PATCH] Make netif_rx_ni preempt-safe, Denis Vlasenko |
| Next by Thread: | Re: [PATCH] Make netif_rx_ni preempt-safe, Denis Vlasenko |
| Indexes: | [Date] [Thread] [Top] [All Lists] |