HomeFreeBSD

getblk: track "non-sterile" bufobj to avoid bo lock on miss if sterile

Description

getblk: track "non-sterile" bufobj to avoid bo lock on miss if sterile

This is a scheme to avoid taking the bufobj lock and doing a second
lookup in the case where in getblk we do an unlocked lookup and find no
buf. Was there really no buf, or were we in the middle of a reassignbuf
race? By tracking any use of reassignbuf with a flag, we can know if
there can't have been a race because there has been no reassignbuf.
Because this scheme is spoiled on the first use of reassignbuf, it is
mostly only beneficial for cases where a certain vnode is never expected
to use dirty bufs at all.

Reviewed by: kib
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D45571

Details

Provenance
rlibbyAuthored on Sun, Jun 16, 9:09 PM
Reviewer
kib
Differential Revision
D45571: getblk: track "non-sterile" bufobj to avoid bo lock on miss if sterile
Parents
rG83caa244bc9e: jedec_dimm: Use device_set_descf()
Branches
Unknown
Tags
Unknown