Subject: Re: pmap_extract()?
To: Eduardo E. Horvath <email@example.com>
From: Chris G. Demetriou <cgd@CS.cmu.edu>
Date: 01/15/1997 16:44:48
> I have been looking through the 4.4 daemon book and that routine was never
> mentioned. In fact, it states that the pmap module is free to discard any
> mapping information about non-wired pages at any time.
> On the other hand, the vm sources use pmap_extract in several places to
> get information about virtual-to-physical mappings. I don't understand
> why the vm system does that because that's precisely what the vm system
> was designed to track.
> [ ... ]
pmap_extract() is called exactly three times in sys/vm/*:
(1) in vm_fault.c, where it's preceeded by:
* Since the pages are wired down, we must be able to
* get their mappings from the physical map system.
(2) in vm_glue.c, where it's used to get information about pages mapped
into the kernel (which must be wired, as things currently stand, right?)
(3) in vm_pager.c in vm_pager_atop(), which is in turn called from
swap_pager.c (apparently on pages mapped into the kernel) and by some
debugging code in vm_pager_unmap_pages() (which is in turn called only
with a VA corresponding to pages mapped into the kernel).
I'm not a VM guru, but it looks like pmap_extract() isn't used
unappropriately here. "how are these cases a problem?"
It's used in a few other places, as well, but those are the only uses
in MI code that i could find on quick (grep of a few dirs)