lkml.org 
[lkml]   [2004]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: tun.c patch to fix "smp_processor_id() in preemptible code"
From
Date
On Fri, 2004-10-15 at 17:43, Alain Schroeder wrote:
> I was getting these traces on a SMP host:

Your patch:

+ preempt_disable();
netif_rx_ni(skb);
+ preempt_enable();

just wraps this code in preempt_disable/enable:

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;
}

Isn't this considered an incorrect use of preempt_disable/enable? My
reasoning is that if this was correct we would see preempt_dis/enable
sprinkled all over the code which it isn't.

Why do you have to call do_softirq like that? I was under the
impression that you raise a softirq and it gets run later.

Lee

-
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.067 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site