Subject: VM/pmap question - how to throw away mappings?
To: None <tech-kern@NetBSD.ORG>
From: Gordon W. Ross <gwr@jericho.mc.com>
List: tech-kern
Date: 12/02/1994 13:52:45
I am using Adam's pmap design on the Sun3. (works nicely now --
Thanks Adam!)  His design is unlike most of the implementations
I have seen in that it does not allocate memory to keep track
of mappings it has been told about.  It installs mappings in
the MMU translation tables (special hardware, not main memory)
and if there is not enough space in the MMU tables, the oldest
mappings in there are thrown away.  This works because the VM
system will reinstall those mappings the next time a fault is
taken on the virtual address mapping that was thrown away.

This fits quite nicely with the strange, Sun proprietary MMU,
(which in this case is treated like a software-managed TLB).
However, when the pmap code removes a mapping to make room,
I think it might help performance to notify the VM code that
we have removed references to some physical pages, so the VM
code can get those pages onto the inactive list sooner.

I looked through the VM code for a function to call for this
purpose, and I found:  vm_page_deactivate(vm_page_t m);
but I'm not sure this is the thing to use.  I'd like to have
something I can call with a physical address to tell the VM
code "here is a physical address that I am about to unmap."

Is there such a thing?
Should there be?
How might this be done?

Thanks,
Gordon Ross