[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20081022.222807.205044577.davem@davemloft.net>
Date: Wed, 22 Oct 2008 22:28:07 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: dada1@...mosbay.com
Cc: robert@...ur.slu.se, shemminger@...tta.com, jgarzik@...ox.com,
netdev@...r.kernel.org
Subject: Re: [PATCH] sky2: skb recycling
From: Eric Dumazet <dada1@...mosbay.com>
Date: Tue, 21 Oct 2008 11:53:58 +0200
> One CPU does the allocations, (interrupts handled by a given CPU)
> Another CPU(s) do(es) the freeing
>
> Such scenario is hard for slab/slub because it needs inter-CPU communication, while
> slub/slab are optimized to deal with per CPU queues/structures (fast path)
>
> skb recycling is an interesting technique because typical NIC handles RX & TX completion
> in one CPU at the same time, thus we can reduce this slab/slub inter-CPU handling.
This matches my feeling on the situation. And that's basically why I
applied the recycling infrastructure patches from Lennert :-)
> skb recycling has a (nice ?) side effect on NUMA platforms, not for forwarding workloads,
> (which are IMHO not the majority of linux machines workloads) but typical servers.
>
> Current NIC drivers actually allocate their RX rings using the memory node
> close to the device.
>
> With RX recycling, we are re-using skb that were allocated by the process itself,
> and this process is likely the one that will process received frames.
I am not so sure about this, however.
It's just trading one NUMA penalty for another.
Also, the device is going to interrupt on a particular cpu within the NUMA
node normally. The scheduler will notice that socket wakeups happen there
and likely migrate the task there.
--
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