[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1303642416.2747.74.camel@edumazet-laptop>
Date: Sun, 24 Apr 2011 12:53:36 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: zhou rui <zhourui.cn@...il.com>
Cc: Tom Herbert <therbert@...gle.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: RPS will assign different smp_processor_id for the same packet?
Le dimanche 24 avril 2011 à 17:36 +0800, zhou rui a écrit :
> >
>
> my understanding:
>
> non-NAPI scenario:
>
> netif_rx( in irq, get_rps_cpu,enqueue_to_backlog to deliver packet to
> cpu queue) ------>net_rx_action(in softirq,deque and process packet)
>
>
> NAPI:
>
> what does RPS do?(in
> irq)------------------------>net_rx_action(softirq)----->netif_receive_skb(get_rps_cpu,enque
> packet)
>
> so my question is:
> for NAPI, get_rps_cpu will be done in softirq?
>
> if the above situation is true,will this happen?
> packet_for_cpu_1 --> cpu0(netif_receive_skb,in softirq) --->delivered
> to cpu1(softirq)
NAPI is done under softirq, yes.
netif_receive_skb()
cpu = get_rps_cpu()
if (othercpu(cpu))
enqueue_to_backlog(cpu)
else
__netif_receive_skb(skb);
enqueue_to_backlog() triggers an IPI (hard IRQ) to other cpu1,
to queue an NAPI context. (and triggers softirq)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists