PATCH: kmalloc packet slab
Quoted 4 lines
Why 1620 bytes ?
Because then 5 objects will fit into one 8 kB memory block:
5*1620+slab control structure.
Quoted 11 lines
Most drivers allocate
packet_size+ 2 bytes.dev_alloc_skbadds another 16 bytes, finallyalloc_skbaddssizeof(struct skb_shared_info).(32bit): 1514b + 2b + 16b + 160b = 1692b
(64bit): 1514b + 2b + 16b + 312b = 1844b
Hmm. If the shared_info is that large then the patch won't help much.
Alan - what is printed in the /proc/slabinfo line for the new cache?
- 1620 bytes is probably a bit too much for archs with 128 byte cache lines and 8 kB pages. If I've calculated correctly, only 4 will fit into one page.
- if the shared info is really that large - is the patch actually useful?
--
Manfred
Quoted 2 lines · Manfred Spraul
Hmm. If the
shared_infois that large then the patch won't help much. Alan - what is printed in the/proc/slabinfoline for the new cache?
On my laptop which has been up for 5 days, and seen quite a bit of network traffic over the xmas holidays..
size-1620(DMA) 0 0 1632 5 2 : tunables 24 12 0 : slabdata 0 0 0 size-1620 35 35 1632 5 2 : tunables 24 12 0 : slabdata 7 7 0
Dave