All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: torvalds@osdl.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Maillist netdev <netdev@oss.sgi.com>
Subject: Re: PATCH: kmalloc packet slab
Date: Mon, 27 Dec 2004 18:17:32 +0100	[thread overview]
Message-ID: <41D043AC.2070203@trash.net> (raw)
In-Reply-To: <1104156983.20944.25.camel@localhost.localdomain>

Alan Cox wrote:
> The networking world runs in 1514 byte packets pretty much all the time.
> This adds a 1620 byte slab for such objects and is one of the internally
> generated Red Hat patches we use on things like Fedora Core 3. Original:
> Arjan van de Ven.
> 
> Signed-off-by: Alan Cox <alan@redhat.com>

Why 1620 bytes ? Most drivers allocate packet_size + 2 bytes.
dev_alloc_skb adds another 16 bytes, finally alloc_skb adds
sizeof(struct skb_shared_info). So we get:

(32bit): 1514b + 2b + 16b + 160b = 1692b
(64bit): 1514b + 2b + 16b + 312b = 1844b

On paths using alloc_skb instead of dev_alloc_skb it's 16 bytes
less, but 1620 bytes is still too small for full-sized packets.

Regards
Patrick

  reply	other threads:[~2004-12-27 17:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-27 14:16 PATCH: kmalloc packet slab Alan Cox
2004-12-27 17:17 ` Patrick McHardy [this message]
2004-12-27 22:23   ` David S. Miller
2004-12-27 22:50     ` Valdis.Kletnieks
2004-12-27 22:58       ` David S. Miller
2004-12-28  0:51     ` Alan Cox
2004-12-28  6:01       ` Dave Jones
2004-12-30 18:00 ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2004-12-27 17:42 Manfred Spraul
2004-12-28  5:59 ` Dave Jones

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=41D043AC.2070203@trash.net \
    --to=kaber@trash.net \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=torvalds@osdl.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.