HomeFreeBSD

radix_tree: compute slot from keybarr

Description

radix_tree: compute slot from keybarr

The computation of keybarr(), the function that determines when a
search has failed at a non-leaf node, can be done in a way that
computes the 'slot' value when keybarr() fails, which is exactly when
slot() would next be invoked. Computing things this way saves space in
search loops.

This reduces the amd64 coding of the search loop in vm_radix_lookup
from 40 bytes to 28 bytes.

Reviewed by: alc
Tested by: pho (as part of a larger change)
Differential Revision: https://reviews.freebsd.org/D41235

Details

Provenance
dougmAuthored on Jul 30 2023, 8:12 PM
Reviewer
alc
Differential Revision
D41235: radix_tree: compute slot from keybarr
Parents
rG5ad29bc8d4d4: amd64: Fix TLB invalidation routines in !SMP kernels
Branches
Unknown
Tags
Unknown