Page MenuHomeFreeBSD

uma: Avoid unmapping ranges in the direct map
ClosedPublic

Authored by markj on Jan 1 2021, 10:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 20, 8:22 PM
Unknown Object (File)
Thu, Mar 19, 7:54 AM
Unknown Object (File)
Mon, Mar 16, 7:53 AM
Unknown Object (File)
Mon, Mar 16, 7:53 AM
Unknown Object (File)
Sun, Mar 15, 10:57 AM
Unknown Object (File)
Sat, Mar 14, 9:05 PM
Unknown Object (File)
Sun, Mar 8, 2:10 PM
Unknown Object (File)
Feb 8 2026, 12:28 PM
Subscribers

Details

Summary

startup_alloc() uses pmap_map() to map slabs used for early allocations.
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.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 35846
Build 32735: arc lint + arc unit

Event Timeline

markj requested review of this revision.Jan 1 2021, 10:22 PM
This revision is now accepted and ready to land.Jan 1 2021, 10:31 PM
alc added inline comments.
sys/vm/uma_core.c
1694

I don't think that it is immediately obvious from this test that it exists so that we don't perform pmap_remove() on the direct map. Could you please add a comment explaining that here?

markj marked an inline comment as done.

Add a comment explaining the check.

This revision now requires review to proceed.Jan 2 2021, 12:12 AM
This revision is now accepted and ready to land.Jan 2 2021, 1:42 AM
This revision was automatically updated to reflect the committed changes.