Subject: Re: Multiple page sizes and the pmap API
To: Bill Sommerfeld <>
From: Jason R Thorpe <>
List: tech-kern
Date: 12/06/2001 13:38:40
On Thu, Dec 06, 2001 at 04:05:11PM -0500, Bill Sommerfeld wrote:

 > >		pmap_enter(pmap, va, pa,
 > Nailing down the semantics a bit more tightly:
 > I assume that the pmap implementation is allowed to ASSERT that both
 > va and pa are aligned properly for the requested page size.


 > What about overlapping mappings with smaller pages?  is the VM system
 > required to remove them first, or are they implicitly blown away?
 > [This could result in a page table page being freed as a side effect of
 > the pmap_enter()]

Hm, good point.  That's a tricky one.

We currently allow pmap_enter() to enter over the top of existing
mappings -- the VM fault code relies on this.  I *think* the only
use of "map different PA at currently-mapped VA" is in the
enter-top-layer-of-COW page (at least, that's the only legitimate
use I can think of).  Everything else should just be protection or
wiring changes.

In fact, I think I'd like to disallow this behavior unless a special
flag is passed down to pmap_enter() explicitly saying that it's okay.
That would allow us to really easly find all the places in the code
that need to do it, and identify them later, at least.

This is really more of an issue for using Really Big pages for
COW mappings, and I haven't thought about that yet.

This would have to be solved before large pages could be used for
vnode and anon mappings, certainly.

        -- Jason R. Thorpe <>