Subject: Re: Implemented pmap_collect for arm32 (was: Re: pmap: Cannot allocate physical memory for L1 (12))
To: Reinoud Zandijk <zandijk@cs.utwente.nl>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-arm32
Date: 09/17/1999 14:43:32
On Fri, 17 Sep 1999 23:34:09 +0200 (MEST) 
 Reinoud Zandijk <zandijk@cs.utwente.nl> wrote:

 > Since pmap_collect wasn't implemented, noone seemed to be working on it,
 > and I had a night off, I made a first implementation of it. It works happy
 > now, allthough it's not fully tested; i.e. does it really removes the L1
 > pages? I hope so! 

If not, it may simply remove enough L2 pages in the right places so that
L1s can be allocated.

 > The implementation is based on snooping the other architectures. I found a
 > usefull simple implementation in the mac68k port. Dunno about it's
 > efficiency though. Maybe it's just a ``it has to work'' implementation
 > instead of a neatly tailored piece of code. 

If PT pages are freed when all mappings are removed from them, then yes,
this is sufficient.  The m68k implementation was taken from the alpha
implementation, which was written by me :-)

It is inefficient in terms of page faults later, when the process runs,
but when you're swapping, you're more concerned about memory, really.

        -- Jason R. Thorpe <thorpej@nas.nasa.gov>