HomeFreeBSD

getblk: reduce time under bufobj lock

Description

getblk: reduce time under bufobj lock

Use the new pctrie combined insert/lookup facility to reduce work and
time under the bufobj interlock when associating a buf with a vnode.

We now do one lookup in the dirty tree and one combined lookup/insert in
the clean tree instead of one lookup in dirty, two in clean, and then an
insert in clean. We also avoid touching the possibly unrelated buf at
the tail of the queue.

Also correct an issue where the actual order of the tail queue depended
on the insertion order due to sign issues.

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

Details

Provenance
rlibbyAuthored on Thu, Jun 6, 3:21 AM
Reviewer
kib
Differential Revision
D45395: getblk: reduce time under bufobj lock
Parents
rGbbf81f46297f: pctrie: add combined insert/lookup operations
Branches
Unknown
Tags
Unknown