HomeFreeBSD

pctrie: add combined insert/lookup operations

Description

pctrie: add combined insert/lookup operations

In several places in code, we do a pctrie lookup followed by a pctrie
insert. Provide a few flavors of combined lookup/insert. This may save
a portion of the work from walking a large pctrie twice.

The general idea is that while we walk the trie during insert, we also
do the same kind of tracking work that we do during pctrie_lookup_ge or
pctrie_lookup_le, and we pass out a pctrie node from where such a lookup
may continue.

Reviewed by: dougm (previous version), kib (previous version), markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D45394

Details

Provenance
rlibbyAuthored on Jun 6 2024, 2:17 AM
Reviewer
dougm
Differential Revision
D45394: pctrie: add combined insert/lookup operations
Parents
rGc70c791f0660: drm2: Remove one more implementation of ilog2()
Branches
Unknown
Tags
Unknown