HomeFreeBSD

Reduce the frequency of hint updates without incurring additional allocation

Description

Reduce the frequency of hint updates without incurring additional allocation
overhead. Previously, blst_meta_alloc() updated the hint after every
successful allocation. However, these "eager" hint updates are of no actual
benefit if, instead, the "lazy" hint update at the start of
blst_meta_alloc() is generalized to handle all cases where the number of
available blocks is less than the requested allocation. Previously, the
lazy hint update at the start of blst_meta_alloc() only handled the ALL-FULL
case. (I would also note that this change provides consistency between
blist_alloc() and blist_fill() in that their hint maintenance is now
entirely lazy.)

Eliminate unnecessary checks for terminators in blst_meta_alloc() and
blst_meta_fill() when handling ALL-FREE meta nodes.

In blst_meta_alloc(), perform a sanity check on the allocation once rather
than repeating it in a loop.

Add or improve several comments.

Address some nearby style errors.

Details

Provenance
alcAuthored on
Parents
rS319834: Write up some basic tests for readlink(1)
Branches
Unknown
Tags
Unknown