netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay.com>
To: LeoY <multisyncfe991@hotmail.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Is this skb recycle buffer helpful to improve Linux network stack performance?
Date: Sun, 09 Oct 2005 00:22:24 +0200	[thread overview]
Message-ID: <434846A0.5080802@cosmosbay.com> (raw)
In-Reply-To: <BAY108-DAV4008FD962D8FEC0497CC193870@phx.gbl>

LeoY a écrit :
> Hi Eric,
> 
> Thanks for your reply.
> 1. For the packet size, this idea is targeting some specific network 
> card driver and we assume all the packet size will not exceed 2KB.
> 2. Currently only Uni-Processor is considered(Hyper-threading is also 
> disabled), I will add spin lock part once it works on the UP.
> 

1) Even on Uni-Processor, you still need to protect against IRQS

2) The big cost of kmalloc()/kfree() come from the 
local_irq_save(flags)/local_irq_restore(flags)

Once you add them in your code, you will discover you gain nothing compared to 
kmalloc()/kfree() that already use a 'ring buffer' : More over, the slab 
implementation is designed to have separate 'ring buffer' (one for each cpu), 
so it is probably better than a 'central ring buffer'

Eric

      reply	other threads:[~2005-10-08 22:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <BAY108-DAV4CDAEF052852412160A0893870@phx.gbl>
     [not found] ` <43483E57.1040205@cosmosbay.com>
2005-10-08 21:59   ` Is this skb recycle buffer helpful to improve Linux network stack performance? LeoY
2005-10-08 22:09     ` Eric Dumazet
2005-10-08 22:14       ` LeoY
2005-10-08 22:22         ` Eric Dumazet [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=434846A0.5080802@cosmosbay.com \
    --to=dada1@cosmosbay.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=multisyncfe991@hotmail.com \
    --cc=netdev@vger.kernel.org \
    /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).