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)
Thu, Dec 11, 8:14 PM
Unknown Object (File)
Sun, Dec 7, 5:41 AM
Unknown Object (File)
Mon, Dec 1, 9:45 PM
Unknown Object (File)
Sun, Nov 30, 12:57 PM
Unknown Object (File)
Wed, Nov 26, 1:35 AM
Unknown Object (File)
Tue, Nov 25, 3:10 AM
Unknown Object (File)
Nov 16 2025, 2:10 PM
Unknown Object (File)
Nov 11 2025, 7:03 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.