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
F157718641: D56185.diff
Sun, May 24, 10:30 AM
Unknown Object (File)
Fri, May 22, 1:17 PM
Unknown Object (File)
Fri, May 22, 2:19 AM
Unknown Object (File)
Mon, May 18, 7:32 AM
Unknown Object (File)
Mon, May 18, 7:25 AM
Unknown Object (File)
Thu, May 14, 12:47 PM
Unknown Object (File)
Thu, May 14, 6:47 AM
Unknown Object (File)
Thu, May 14, 1:32 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