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)
Dec 28 2023, 12:15 AM
Unknown Object (File)
Dec 20 2023, 1:05 AM
Unknown Object (File)
Nov 5 2023, 3:36 AM
Unknown Object (File)
Oct 4 2023, 1:37 AM
Unknown Object (File)
Sep 28 2023, 10:16 PM
Unknown Object (File)
Aug 8 2023, 8:37 AM
Unknown Object (File)
Jul 5 2023, 5:24 AM
Unknown Object (File)
Jul 5 2023, 5:22 AM

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.