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)
Dec 20 2023, 7:57 AM
Unknown Object (File)
Oct 28 2023, 2:35 AM
Unknown Object (File)
Aug 30 2023, 3:04 PM
Unknown Object (File)
May 14 2023, 7:02 PM
Unknown Object (File)
Apr 26 2023, 4:03 AM
Unknown Object (File)
Apr 2 2023, 4:19 PM
Unknown Object (File)
Apr 2 2023, 4:18 PM
Unknown Object (File)
Apr 2 2023, 4:15 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.