HomeFreeBSD

uma_core: Rely on domainset iterator to wait on M_WAITOK

Description

uma_core: Rely on domainset iterator to wait on M_WAITOK

Commit 8b987a77691d ("Use per-domain keg locks.") removed the need to
lock the keg entirely, replacing it with per-domain keg locks. In
particular, it removed the need to hold a lock over waiting for a domain
to grow free memory.

Simplify the code of keg_fetch_slab() and uma_prealloc() by removing the
M_WAITOK -> M_NOWAIT downgrade and the local call to vm_wait_doms()
(which used to necessitate temporary dropping the keg lock) which the
iterator machinery already handles on M_WAITOK (and compatibly with
vm_domainset_iter_ignore() at that, although that does not matter now).

Reviewed by: bnovkov, markj
Tested by: bnovkov
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52441

(cherry picked from commit 781802df7a2bfe224ef17596d56cf83c49517655)

Details

Provenance
olceAuthored on Sep 8 2025, 5:37 PM
Reviewer
bnovkov
Differential Revision
D52441: uma_core: Rely on domainset iterator to wait on M_WAITOK
Parents
rGfecb79a5a83e: libsa: smbios: Detect less-than-64-bit platforms via __SIZEOF_SIZE_T__
Branches
Unknown
Tags
Unknown