lkml.org 
[lkml]   [2004]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: tun.c patch to fix "smp_processor_id() in preemptible code"
From
Date
On Tue, 2004-10-19 at 17:35, Herbert Xu wrote:
> Lee Revell <rlrevell@joe-job.com> wrote:
> >
> > I looked at Robert Love's book and I am still unclear on the use of
> > do_softirq above. To reiterate the question: why does netif_rx_ni have
> > to manually flush any pending softirqs on the current proccessor after
> > doing the rx? Is this just a performance hack?
>
> Yes it allows the packet to be processed immediately.

Ok, here is the correct patch. If this is really just a matter of
performance, and not required for correctness, disabling preemption is
broken, right?

Lee

--- include/linux/netdevice.h~ 2004-10-15 20:19:33.000000000 -0400
+++ include/linux/netdevice.h 2004-10-19 17:47:03.000000000 -0400
@@ -697,8 +697,6 @@
static inline int netif_rx_ni(struct sk_buff *skb)
{
int err = netif_rx(skb);
- if (softirq_pending(smp_processor_id()))
- do_softirq();
return err;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.083 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site