diff options
author | jasone <jasone@FreeBSD.org> | 2007-03-23 05:05:48 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2007-03-23 05:05:48 +0000 |
commit | a1325e04bab8daf2ca1b3f6dc2d9ed6eef96f5f3 (patch) | |
tree | fc166cec1bf4e69eab990c85ba88e338243b8ba4 /sys/vm | |
parent | 1639f74854940b93f384f48a250acd15ab50a812 (diff) | |
download | FreeBSD-src-a1325e04bab8daf2ca1b3f6dc2d9ed6eef96f5f3.zip FreeBSD-src-a1325e04bab8daf2ca1b3f6dc2d9ed6eef96f5f3.tar.gz |
Use extents rather than binary buddies to track free pages within
chunks. This allows runs to be any multiple of the page size. The
primary advantage is that large objects are no longer constrained to be
2^n pages, which can dramatically decrease internal fragmentation for
large objects. This also allows the sizes for runs that back small
objects to be more finely tuned.
Free runs are searched for linearly using the chunk page map (with the
help of some heuristic optimizations). This changes the allocation
policy from "first best fit" to "first fit". A prototype red-black tree
implementation for tracking free runs that implemented "first best fit"
did not cause a measurable speed or memory usage difference for
realistic chunk sizes (though of course it is possible to construct
benchmarks that favor one allocation policy over another).
Refine the handling of fullness constraints for small runs to be more
tunable.
Restructure the per chunk page map to contain only two fields per entry,
rather than four. Also, increase each entry from 4 to 8 bytes, since it
allows for 32-bit integers, without increasing the number of chunk
header pages.
Relax the maximum chunk size constraint. This is of no practical
interest; it is merely fallout from the chunk page map restructuring.
Revamp statistics gathering and reporting to be faster, clearer and more
informative. Statistics gathering is fast enough now to have little
to no impact on application speed, but it still requires approximately
two extra pages of memory per arena (per process). This memory overhead
may be acceptable for most systems, but we still need to leave
statistics gathering disabled by default in RELENG branches.
Rename NO_MALLOC_EXTRAS to MALLOC_PRODUCTION in order to make its intent
clearer (i.e. it should be defined in RELENG branches).
Diffstat (limited to 'sys/vm')
0 files changed, 0 insertions, 0 deletions