Subject: PT page stealing -- should we bother?
To: None <tech-kern@netbsd.org>
From: Jason R Thorpe <thorpej@zembu.com>
List: tech-kern
Date: 01/01/2001 23:11:43
Background: One of the things that came along with UVM was a
rewrite of the i386 pmap module.  One of the features of the
new pmap module was that, in low memory conditions, it could
steal a page table page from another pmap in order for a
pmap_enter() to succeed -- the same was done for PV table
entries.

Other pmaps have also implemented a similar feature (table
pools in the sun3x pmap, and the same type of PT page/PV entry
stealing in the Alpha pmap).

Unfortunately, if you can't steal a PT page, then the only
thing you could do was panic.

Since, however, UVM has been changed so that pmap_enter() is
allowed to fail in the cases which the PT page stealing would
have helped.  In these cases, uvm_fault() will then simply
wait until memory is available, and then retry the fault.

Now that uvm_fault() can do this, the need to steal resources
from other pmaps is basically gone, and we can simply let
UVM simply manage all of that.

All things considered, it seems like it's a pretty good reason
to rip out the PT page stealing stuff from pmaps where it is
not an integral part of how PT page management is done (e.g. sun3x,
taking this out of the pmap would be a major overhaul, but it would
be pretty easy to rip it out of the i386 and alpha pmaps).

Thoughts?

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>