Main index | Section 9 | Options |
#include <sys/param.h>
#include <vm/vm.h>
#include <vm/pmap.h>
The pmap_quick_remove_page() function removes a mapping previously created by pmap_quick_enter_page() at kva, making the KVA frame used by pmap_quick_enter_page() available for reuse.
On many architectures, pmap_quick_enter_page() uses a per-CPU pageframe. In those cases, it must disable preemption on the local CPU. The corresponding call to pmap_quick_remove_page() then re-enables preemption. It is therefore not safe for machine-independent code to sleep or perform locking operations while holding these mappings. Current implementations only guarantee the availability of a single page for the calling thread, so calls to pmap_quick_enter_page() must not be nested.
pmap_quick_enter_page() and pmap_quick_remove_page() do not sleep, and pmap_quick_enter_page() always returns a valid address. It is safe to use these functions under all types of locks except spin mutexes. It is also safe to use them in all thread contexts except primary interrupt context.
The page must not be swapped or otherwise reused while the mapping is active. It must be either wired or held, or it must belong to an unmanaged region such as I/O device memory.
PMAP_QUICK_ENTER_PAGE (9) | August 6, 2015 |
Main index | Section 9 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | "I liken starting one's computing career with Unix, say as an undergraduate, to being born in East Africa. It is intolerably hot, your body is covered with lice and flies, you are malnourished and you suffer from numerous curable diseases. But, as far as young East Africans can tell, this is simply the natural condition and they live within it. By the time they find out differently, it is too late. They already think that the writing of shell scripts is a natural act." | ” |
— Ken Pier, Xerox PARC |