netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org, tglx@linutronix.de
Subject: Re: Generic rx-recycling and emergency skb pool
Date: Thu, 26 Aug 2010 19:31:08 +0200	[thread overview]
Message-ID: <20100826173108.GA32294@Chamillionaire.breakpoint.cc> (raw)
In-Reply-To: <1278138205.2474.27.camel@edumazet-laptop>

* Eric Dumazet | 2010-07-03 08:23:25 [+0200]:

>Sebastian
Eric,

>Most modern NICS are multiqueue, so that each cpu can use a queue on its
>own without slowing down other cpus.
True. gianfar uses multiqueue howver in its napi poll one CPU grabs a
locks and inspects every queue one by one.

>Yet rx recycling has one queue per device, defeating part of the
>multiqueue goal.
Well, we could add rx recycling per queue if you prefer it that way.

>Patch 6/8 even touches dev->refcnt on each emerg packet
>Patch 6/8 adds 8 bytes (emerg_dev) to skb. Oh well...
>
>Adding cache layers, especially dumb ones like this one, is probably the
>sign something more fundamental is broken somewhere.

The memory for the skbs is comming from slab. slab's latency is getting
quite high on memory pressure. Therefore I try to avoid talking to slab
while I'm allocating a new skb. So I created a pool of pre-allocated.

>I do believe for example that netdev_alloc_skb() should not try to use
>the node affinity of the device, but use current cpu node for sk_buff at
>least, and possibly for data part too.
>
>One other problem of skb are the two memory blocs involved, and fact
>that first one (skb) is already very big and fat, and filled/dirtied
>many cycles before its use in RX path.
>
>Maybe its time to provide new API, so that a driver can build an skb at
>the time RX interrupt is handled, not at the time the rx ring buffer is
>renewed. RX ring should only provide the data part to NIC, and skb
>should be built when NIC delivers the frame, so that we provide to IP
>stack a real hot skb.

And where are you allocating the memory from? Remember, SLAB could be
slow :)

Sebastian

      parent reply	other threads:[~2010-08-26 17:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-02 19:20 Generic rx-recycling and emergency skb pool Sebastian Andrzej Siewior
2010-07-02 19:20 ` [PATCH 1/8] net: implement generic rx recycling Sebastian Andrzej Siewior
2010-07-02 19:20 ` [PATCH 2/8] net/gianfar: use generic recycling infrasstructure Sebastian Andrzej Siewior
2010-07-02 19:20 ` [PATCH 3/8] net/mv643xx: use generic recycling infrastructure Sebastian Andrzej Siewior
2010-07-02 19:20 ` [PATCH 4/8] net/stmmac: " Sebastian Andrzej Siewior
2010-07-02 19:20 ` [PATCH 5/8] net/ucc_geth: " Sebastian Andrzej Siewior
2010-07-02 19:20 ` [PATCH 6/8] net: implement emergency pools Sebastian Andrzej Siewior
2010-07-02 19:20 ` [PATCH 7/8] net/emergency_skb: create a deep copy on clone Sebastian Andrzej Siewior
2010-07-02 19:20 ` [PATCH 8/8] net/emergency: remove locking from reycling pool if emergncy pools are not used Sebastian Andrzej Siewior
2010-07-03  6:23 ` Generic rx-recycling and emergency skb pool Eric Dumazet
2010-07-03  6:46   ` David Miller
2010-07-03  7:31     ` Eric Dumazet
2010-08-26 17:31   ` Sebastian Andrzej Siewior [this message]

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=20100826173108.GA32294@Chamillionaire.breakpoint.cc \
    --to=sebastian@breakpoint.cc \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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).