netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* skb processing in SMP kernel
@ 2007-11-14 20:14 Marek Kierdelewicz
  2007-11-14 20:34 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Kierdelewicz @ 2007-11-14 20:14 UTC (permalink / raw)
  To: netdev

Hi there,

I'm looking at file /usr/src/linux/net/core/dev.c
function "int netif_rx(struct sk_buff *skb)"
and following line:
 
queue = &__get_cpu_var(softnet_data);

Is it possible to put skb into the queue of another CPU then the one
servicing the interrupt? (Disclaimer: Yeah, I know it's probably not
the smartest thing to do because of locks and cache line bounces). How
could it be accomplished? Any lead, comment, link appreciated.


pozdrawiam
-- 
Marek Kierdelewicz
Kierownik Działu Systemów Sieciowych, KoBa
Manager of Network Systems Department, KoBa
tel. (85) 7406466; fax. (85) 7406467
e-mail: admin@koba.pl

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: skb processing in SMP kernel
  2007-11-14 20:14 skb processing in SMP kernel Marek Kierdelewicz
@ 2007-11-14 20:34 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2007-11-14 20:34 UTC (permalink / raw)
  To: Marek Kierdelewicz; +Cc: netdev

On Wed, 14 Nov 2007 21:14:37 +0100
Marek Kierdelewicz <marek@koba.pl> wrote:

> Hi there,
> 
> I'm looking at file /usr/src/linux/net/core/dev.c
> function "int netif_rx(struct sk_buff *skb)"
> and following line:
>  
> queue = &__get_cpu_var(softnet_data);
> 
> Is it possible to put skb into the queue of another CPU then the one
> servicing the interrupt? (Disclaimer: Yeah, I know it's probably not
> the smartest thing to do because of locks and cache line bounces). How
> could it be accomplished? Any lead, comment, link appreciated.
> 
> 
> pozdrawiam

You could but then you would need locking on the queue, and that would
defeat the whole purpose of per-cpu queue's.  You would also need to do
an IPI to notify the other processor.

If you are trying to do packet distribution, look at the newest drivers that use MSI-X
and napi to do packet distribution.

-- 
Stephen Hemminger <shemminger@linux-foundation.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-14 20:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-14 20:14 skb processing in SMP kernel Marek Kierdelewicz
2007-11-14 20:34 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).