Edit

IABSD.fr/src/usr.bin/netstat

Branch :

  • Show log

    Commit

  • Author : dlg
    Date : 2026-04-22 21:58:53
    Hash : 3055edfe
    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@