]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Simplify the processing a leaf mask to find big-enough ranges of set
authorDoug Moore <dougm@FreeBSD.org>
Sat, 14 Dec 2019 19:44:42 +0000 (19:44 +0000)
committerDoug Moore <dougm@FreeBSD.org>
Sat, 14 Dec 2019 19:44:42 +0000 (19:44 +0000)
commit9f70442a04ad0c860a8cceff7604307d1fae1a6b
tree34c1949f39dbe44081147f9d8b93969e679804d7
parentdfd1d0fcabee38a007a60cd1d8b7d5c766f0405f
Simplify the processing a leaf mask to find big-enough ranges of set
bits, by storing and modifying the complement of the original leaf
mask, and by avoiding some unnecessary intermediate variables in
computing the shift amounts. The logic is similar to what has recently
been committed to sys/sys/bitstring.h.

Compute better hint updates for the case when the cursor starts in
mid-leaf, and eliminates some otherwise viable solutions. Assume the
worst case, that all the eliminated offsets could have been solutions,
and you can still compute a better hint than we use now.

Eliminate some unnecessary conditional control flow.

Approved by: alc
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D22666
sys/kern/subr_blist.c