Page MenuHomeFreeBSD

pmap: Do not use PMAP_LOCK_INIT with kernel_pmap
ClosedPublic

Authored by markj on Mar 31 2026, 3:16 PM.
Tags
None
Referenced Files
F174732675: D56185.id174641.diff
Mon, Oct 5, 2:15 PM
Unknown Object (File)
Sat, Oct 3, 12:26 PM
Unknown Object (File)
Thu, Oct 1, 1:14 PM
Unknown Object (File)
Thu, Oct 1, 1:07 PM
Unknown Object (File)
Sat, Sep 26, 9:11 PM
Unknown Object (File)
Sun, Sep 20, 8:42 PM
Unknown Object (File)
Sat, Sep 19, 3:03 AM
Unknown Object (File)
Sun, Sep 13, 11:34 AM

Details

Summary

The kernel_pmap lock is a bit special: it does not need the DUPOK flag,
and it really belongs to a different lock class. If it belongs to the
same class as regular pmap locks, than witness may report warnings when
performing UMA allocations under a regular pmap lock, if the allocation
triggers a pmap_growkernel() call.

Replace instances of PMAP_LOCK_INIT(kernel_pmap) with inline mtx_init()
calls to silence some witness warnings I see with some uncommitted test
programs.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable