]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r320077
authoralc <alc@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 25 Jul 2017 04:13:43 +0000 (04:13 +0000)
committeralc <alc@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 25 Jul 2017 04:13:43 +0000 (04:13 +0000)
commit7313c405fd36f8d9238b7396ce98dd8c637fb6b3
tree0a77f907d912dae58b9a382b820d0c6e8241f208
parentfe32a77fcf645de5ae3f6e97f40bc4005dc09963
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@321459 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/subr_blist.c
sys/sys/blist.h