]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
uma: Avoid unmapping direct-mapped slabs
authorMark Johnston <markj@FreeBSD.org>
Sun, 3 Jan 2021 16:31:00 +0000 (11:31 -0500)
committerMark Johnston <markj@FreeBSD.org>
Sun, 3 Jan 2021 16:50:31 +0000 (11:50 -0500)
commit663de81f852fccc38006b0172f9337147b65890f
tree64d4156b0a82f015421e3d7574b10d4e90fa4d30
parent6a5c55666bd2e66e62982293f6270527cc32ed24
uma: Avoid unmapping direct-mapped slabs

startup_alloc() uses pmap_map() to map slabs used for bootstrapping the
VM.  pmap_map() may ignore the hint address and simply return a range
from the direct map.  In this case we must not unmap the range in
startup_free().

UMA uses bootstart and bootmem to track the range of KVA into which
slabs are mapped if the direct map is not used.  Unmap a startup slab
only if it was mapped into that range.

Reported by: alc
Reviewed by: alc, kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27885
sys/vm/uma_core.c