netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dada1@cosmosbay.com
Cc: robert@robur.slu.se, shemminger@vyatta.com, jgarzik@pobox.com,
	netdev@vger.kernel.org
Subject: Re: [PATCH] sky2: skb recycling
Date: Wed, 22 Oct 2008 22:28:07 -0700 (PDT)	[thread overview]
Message-ID: <20081022.222807.205044577.davem@davemloft.net> (raw)
In-Reply-To: <48FDA6B6.70905@cosmosbay.com>

From: Eric Dumazet <dada1@cosmosbay.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.

  parent reply	other threads:[~2008-10-23  5:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-21  2:09 [PATCH] sky2: skb recycling Stephen Hemminger
2008-10-21  5:18 ` David Miller
2008-10-21 19:59   ` Rick Jones
2008-10-21 20:15     ` Eric Dumazet
2008-10-21 20:38       ` Stephen Hemminger
2008-10-22 23:58         ` Rick Jones
2008-10-23  0:05           ` Stephen Hemminger
2008-10-23  0:17             ` Rick Jones
2008-10-21  5:54 ` Eric Dumazet
2008-10-21  8:25   ` Robert Olsson
2008-10-21  8:49     ` Terry
2008-10-21 12:17       ` Robert Olsson
2008-10-21 12:34         ` Terry
2008-10-21 12:42         ` Eric Dumazet
2008-10-21 13:04           ` Robert Olsson
2008-10-21  9:53     ` Eric Dumazet
2008-10-21 11:58       ` Robert Olsson
2008-10-23  5:28       ` David Miller [this message]
2008-10-21 15:09   ` Stephen Hemminger
2008-10-22 11:03 ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081022.222807.205044577.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dada1@cosmosbay.com \
    --cc=jgarzik@pobox.com \
    --cc=netdev@vger.kernel.org \
    --cc=robert@robur.slu.se \
    --cc=shemminger@vyatta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).