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
F106857290: D27885.diff
Mon, Jan 6, 12:26 PM
Unknown Object (File)
Nov 28 2024, 3:51 PM
Unknown Object (File)
Nov 24 2024, 1:34 PM
Unknown Object (File)
Nov 24 2024, 1:34 PM
Unknown Object (File)
Nov 24 2024, 1:34 PM
Unknown Object (File)
Nov 24 2024, 1:34 PM
Unknown Object (File)
Nov 24 2024, 1:34 PM
Unknown Object (File)
Nov 17 2024, 6:04 AM
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 35848
Build 32737: 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–1700

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.