HomeFreeBSD

ufs: Avoid M_WAITOK allocations when building a dirhash

Description

ufs: Avoid M_WAITOK allocations when building a dirhash

At this point the directory's vnode lock is held, so blocking while
waiting for free pages makes the system more susceptible to deadlock in
low memory conditions. This is particularly problematic on NUMA systems
as UMA currently implements a strict first-touch policy.

ufsdirhash_build() already uses M_NOWAIT for other allocations and
already handled failures for the block array allocation, so just convert
to M_NOWAIT.

PR: 253992
Reviewed by: markj, mckusick, vangyzen
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D29045

Details

Provenance
dgmorris_earthlink.netAuthored on May 20 2021, 2:54 PM
markjCommitted on May 20 2021, 3:25 PM
Reviewer
markj
Differential Revision
D29045: Don't use sleeping allocations for ufs dirhash blocks when holding directory vnode
Parents
rG9938fcaa6565: pfctl tests: Test fairq configuration
Branches
Unknown
Tags
Unknown