CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2026/04/22 15:58:53
Modified files:
usr.bin/netstat: mbuf.c
sys/kern : uipc_mbuf.c
Log message:
increase the 9k mbuf clusters to 9k + 128 bytes
pools try to amortise the cost of items against the underlying
kernel memory allocator by rounding the "page" size up to fit at
least 8 items, and then rounding that up to the next power of 2.
the 9k clusters are 9 * 1024 bytes, which is 72k after being
multiplied by 8, which becomes 128k cos it's the next power of 2.
if you divide 128k by 9k, you get 14 and some change. there's enough
change that we can raise the cluster size by 128 bytes without
affecting the page size or the number of items on the page. ie,
it's still going to use 128k "pages" and fit 14 clusters.
i can take advantage of this in some drivers for stupid hardware,
so given the above it seems like a plan without any drawbacks apart
from the pool name getting a bit bigger.
ok claudio@