All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: "Hisham Kotry" <hkotry@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: skb diet
Date: Sun, 16 Apr 2006 17:16:31 +0200	[thread overview]
Message-ID: <200604161716.31276.ak@suse.de> (raw)
In-Reply-To: <baebb9a00604160556o2abe6df1y4a185a0fd8f45e7b@mail.gmail.com>

On Sunday 16 April 2006 14:56, Hisham Kotry wrote:
> > Where would that tag list be stored if you want to remove the
> > 40 bytes of ->cb?
>
> I apologize if I wasn't clear, the tag list would go in a new
> skb->tags field replacing the existsing skb->cb array, so the skb
> would lose 40-sizeof(void*) bytes wich seems reasonable to me.

This means for the common TCP case you would actually 
need more memory than before - a new pointer and overhead
from the tags. Currently we neither need pointer nor tags 
for anything.

Also you would need to complicate alloc_skb to preallocate
this memory and complicate the freeing by checking for it
and freeing it if it was allocated dynamically 
(e.g. if a later layer needed it, not the layer that first allocates
it you would need to allocate a new buffer later which would then
need to be freed) 

>
> > Linux 2.0 did something like this, but that was removed for good
> > reasons. Now TCP always clones skbs before sending it out.
>
> Do you remember what those reasons were? I couldn't find a related
> discussion in the archives. I think the BSD mbuf tags approach is
> sound enough to justify the move.

>From your description so far it seems to only have disadvantages.

> > And optimizing for uncommon cases (not TCP) doesn't seem too useful.
>
> As pointed out by Bert Hubert, there are people who have heavy traffic
> on non-tcp connections.

It's a small minority compared to TCP users.

-Andi


  reply	other threads:[~2006-04-16 16:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-15 11:17 skb diet Hisham Kotry
2006-04-15 19:22 ` Andi Kleen
2006-04-16 11:43   ` bert hubert
2006-04-16 12:56   ` Hisham Kotry
2006-04-16 15:16     ` Andi Kleen [this message]
2006-04-17  5:25       ` David S. Miller

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=200604161716.31276.ak@suse.de \
    --to=ak@suse.de \
    --cc=hkotry@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.