From: Stephen Hemminger <shemminger@osdl.org>
To: "Yang, Steve" <steve.yang@windriver.com>
Cc: <netdev@vger.kernel.org>
Subject: Re: [patch] Performance enhancement patches for SB1250 MAC
Date: Fri, 13 Oct 2006 13:24:58 -0700 [thread overview]
Message-ID: <20061013132458.339afbe6@freekitty> (raw)
In-Reply-To: <D9055C0A0A86BD4E89AD96A89EA767DBA6AFBC@ALA-MAIL03.corp.ad.wrs.com>
On Thu, 12 Oct 2006 17:45:54 -0700
"Yang, Steve" <steve.yang@windriver.com> wrote:
> Stephen,
>
> I assume the "expense" you referred to is the reserved SK cache buffers.
>
>
> 1. The SKB_CACHE does hold on to buffers which would
> otherwise be returned to the system (although the
> number it holds on to is limited and configurable).
> These buffers are only returned with certainty
> at module unload time, although with normal traffic
> most of them would be recycled pretty quick. I think
> the cache was implemented as a stack, rather than a
> FIFO, which could cause a few buffers to be held for
> quite a while under light loads.
>
> 2. SKB_CACHE, just like NAPI, is also a configurable
> option. Systems that need the performance have the
> option of turning this on, at the expense of small
> number of buffers; other systems which don't care
> much about networking performance can leave this
> option off.
>
> 3. Can you elaborate other possible issues that you
> touch upon (memory starvation/race, etc.)?
>
> Regards,
> Steve Yang
Several drivers have tried to do this in the past, but the consensus
has been that this is a bad idea.
Your code captures transmit skb's and uses them for receive. Why is
this a good idea? It is a maintenance nightmare, it breaks a lot of
the cleanup/initialization of skb's and means who ever changes something
like TSO has to go looking at some driver that is doing squirrley games.
Plus, your cache requires two extra lock round trips is seems.
The cost of alloc_skb should be trivial.
next parent reply other threads:[~2006-10-13 21:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <D9055C0A0A86BD4E89AD96A89EA767DBA6AFBC@ALA-MAIL03.corp.ad.wrs.com>
2006-10-13 20:24 ` Stephen Hemminger [this message]
2006-11-22 0:33 [patch] Performance enhancement patches for SB1250 MAC Yang, Steve
-- strict thread matches above, loose matches on Subject: below --
2006-11-21 16:45 Yang, Steve
2006-11-21 19:12 ` Stephen Hemminger
2006-11-20 21:40 Yang, Steve
2006-11-20 23:35 ` Stephen Hemminger
2006-11-20 23:58 ` David Miller
2006-11-21 14:26 ` Martin Michlmayr
2006-10-12 21:54 Yang, Steve
2006-10-12 22:13 ` Stephen Hemminger
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=20061013132458.339afbe6@freekitty \
--to=shemminger@osdl.org \
--cc=netdev@vger.kernel.org \
--cc=steve.yang@windriver.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