summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2017-07-25 03:43:00 +0000
committeralc <alc@FreeBSD.org>2017-07-25 03:43:00 +0000
commit95707b57fead84d6a4d189c7fb3242a7ea82dfaf (patch)
treed980a0edae74053fe8853486e974781fe4010ca6 /release
parent06aab486f58fbbae85f5f164336e29546e4b8b6f (diff)
downloadFreeBSD-src-95707b57fead84d6a4d189c7fb3242a7ea82dfaf.zip
FreeBSD-src-95707b57fead84d6a4d189c7fb3242a7ea82dfaf.tar.gz
MFC r320077
Change blist_alloc()'s allocation policy from first-fit to next-fit so that disk writes are more likely to be sequential. This change is beneficial on both the solid state and mechanical disks that I've tested. (A similar change in allocation policy was made by DragonFly BSD in 2013 to speed up Poudriere with "stressful memory parameters".) Increase the width of blst_meta_alloc()'s parameter "skip" and the local variables whose values are derived from it to 64 bits. (This matches the width of the field "skip" that is stored in the structure "blist" and passed to blst_meta_alloc().) Eliminate a pointless check for a NULL blist_t. Simplify blst_meta_alloc()'s handling of the ALL-FREE case. Address nearby style errors. MFC r320417 Address the remaining integer overflow issues with the "skip" parameters and "next_skip" variables. The "skip" value in struct blist has long been a 64-bit quantity but various functions have implicitly truncated this value to 32 bits. Now, all arithmetic involving the "skip" value is 64 bits wide. (This should allow us to relax the size limit on a swap device in the swap pager.) Maintain the ability to test this allocator as a user-space application by including <stdbool.h>. Remove an unused variable from blst_radix_print(). MFC r320527 Change blst_leaf_alloc() to handle a cursor argument, and to improve performance. To find in the leaf bitmap all ranges of sufficient length, use a doubling strategy with shift-and-and until each bit still set represents a bit sequence of length 'count', or until the bitmask is zero. In the latter case, update the hint based on the first bit sequence length not found to be available. For example, seeking an interval of length 12, the set bits of the bitmap would represent intervals of length 1, then 2, then 3, then 6, then 12. If no bits are set at the point when each bit represents an interval of length 6, then the hint can be updated to 5 and the search terminated. If long-enough intervals are found, discard those before the cursor. If any remain, use binary search to find the position of the first of them, and allocate that interval.
Diffstat (limited to 'release')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud