[Bug 253992] ufsdirhash_build() sleeps with directory vnode locked due to M_WAITOK

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Mar 3 19:11:03 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253992

--- Comment #3 from Mark Johnston <markj at FreeBSD.org> ---
Right, UMA has defaulted to the FIRSTTOUCH policy since
https://reviews.freebsd.org/D22831 .  Indeed, the policy is kind of
questionable.  It is strict first-touch, i.e., always returns local memory. 
First-touch policies implemented using domainsets do not have this property
unless explicitly requested, so if you allocate a page with e.g.,
DOMAINSET_PREF(0), we will return memory from other domains if necessary to
avoid sleeping.

I am not sure why FIRSTTOUCH has this strict implementation.  Originally it was
used for bucket zones, which are always NOWAIT.  And until recently UMA did not
have special handling for cross-domain frees.

We could consider adding a new (default) policy which is not strict.  It is
likely necessary for ZFS to work well on NUMA systems, since its buffer cache
memory is allocated from UMA.  That is a larger problem though.  In this case
though the pressure is apparently caused by a kernel memory leak.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list