netdev
[Top] [All Lists]

add-a-slab-for-ethernet.patch

To: netdev@xxxxxxxxxxx
Subject: add-a-slab-for-ethernet.patch
From: Andrew Morton <akpm@xxxxxxxx>
Date: Mon, 12 Apr 2004 22:25:32 -0700
Sender: netdev-bounce@xxxxxxxxxxx
I've been sitting on this for a while:


From: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx>

Improve the packing density for 1536-byte ethernet frames on 8k or larger
page size machines.

The slab has 1620 bytes - 5 should fit into one page (1620*5+40 bytes
slab+5*4 bufctl - 32 bytes should remain unused on 64-bit archs).



---

 25-akpm/include/linux/kmalloc_sizes.h |    3 +++
 1 files changed, 3 insertions(+)

diff -puN include/linux/kmalloc_sizes.h~add-a-slab-for-ethernet 
include/linux/kmalloc_sizes.h
--- 25/include/linux/kmalloc_sizes.h~add-a-slab-for-ethernet    Tue Feb 24 
14:40:06 2004
+++ 25-akpm/include/linux/kmalloc_sizes.h       Tue Feb 24 14:40:06 2004
@@ -12,6 +12,9 @@
        CACHE(256)
        CACHE(512)
        CACHE(1024)
+#if (PAGE_SIZE != 4096)        /* special cache for eth skbs - 5 fit into one 
8 kB page */
+       CACHE(1620)
+#endif
        CACHE(2048)
        CACHE(4096)
        CACHE(8192)

_


Problem is, I'm not sure it's worth the effort - it seems that the system
just never has that many full-sized ethernet frames floating about, so we
don't save significant amounts of memory.


Am I wrong?

<Prev in Thread] Current Thread [Next in Thread>