Page MenuHomeFreeBSD

KPI for quick single-page mappings
ClosedPublic

Authored by jah on Jul 7 2015, 4:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 28, 2:33 AM
Unknown Object (File)
Mon, Oct 28, 2:32 AM
Unknown Object (File)
Mon, Oct 28, 2:32 AM
Unknown Object (File)
Mon, Oct 28, 2:32 AM
Unknown Object (File)
Sep 11 2024, 5:26 AM
Unknown Object (File)
Sep 8 2024, 4:19 AM
Unknown Object (File)
Sep 8 2024, 1:48 AM
Unknown Object (File)
Sep 7 2024, 1:06 PM

Details

Summary

Add two new pmap functions:
vm_offset_t pmap_quick_enter_page(vm_page_t m)
void pmap_quick_remove_page(vm_offset_t kva)

These will create and destroy a temporary, CPU-local KVA mapping of a specified page.

Guarantees:
--Will not sleep and will not fail.
--Safe to call under a non-sleepable lock or from an ithread

Restrictions:
--Not guaranteed to be safe to call from an interrupt filter or under a spin mutex on all platforms
--Current implementation does not guarantee more than one page of mapping space across all platforms. MI code should not make nested calls to pmap_quick_enter_page.
--MI code should not perform locking while holding onto a mapping created by pmap_quick_enter_page

The idea is to use this in busdma, for bounce buffer copies as well as virtually-indexed cache maintenance on mips and arm.

Test Plan

Cross-compiled for all arches and pmaps, tested with simple kmod on amd64 and i386.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jah retitled this revision from to KPI for quick single-page mappings.
jah updated this object.
jah edited the test plan for this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.