Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/sys/kern
Module Name: src
Committed By: mrg
Date: Wed Feb 24 05:36:02 UTC 2021
Modified Files:
src/sys/kern: subr_pool.c
Log Message:
skip redzone on pools with the allocation (including all overhead)
on anything greater than half the pool pagesize.
this stops 4KiB being used per allocation from the kmem-02048 pool,
and 64KiB per allocation from the buf32k pool.
we're still wasting 1/4 of space for overhead on eg, the buf1k or
kmem-01024 pools. however, including overhead costs, the amount of
useless space (not used by consumer or overhead) reduces from 47%
to 18%, so this is far less bad overall.
there are a couple of ideas on solving this less ugly:
- pool redzones are enabled with DIAGNOSTIC kernels, which is
defined as being "fast, cheap". this is not cheap (though it
is relatively fast if you don't run out of memory) so it does
not really belong here as is, but DEBUG or a special option
would work for it.
- if we increase the "pool page" size for these pools, such that
the overhead over pool page is reduced to 5% or less, we can
have redzones for more allocations without using more space.
also, see this thread:
https://mail-index.netbsd.org/tech-kern/2021/02/23/msg027130.html
To generate a diff of this commit:
cvs rdiff -u -r1.275 -r1.276 src/sys/kern/subr_pool.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index