Subject: Re: CVS commit: src
To: Jonathan Stone <jonathan@dsg.stanford.edu>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-mips
Date: 12/05/1998 15:19:58
On Sat, 05 Dec 1998 15:06:01 -0800 
 Jonathan Stone <jonathan@DSG.Stanford.EDU> wrote:

 > >"referenced" and "modifed" are attributes of the hardware page, not the
 > >mapping of it.
 > 
 > Exactly so. The VM system should track them as PG_CLEAN and not mess
 > around with the clean or referenced bits when mappings get removed.
 > (That goes for UVM, too.)

Whatever.  The fact remains that the current interface defined by both
Mach VM and UVM is that "pmaps remember mod/ref even when the mapping
is removed".

Also, PG_CLEAN doesn't handle "referenced".  References is used by the
"two-handed clock" to find pages eligible for inactivation.

 > Castor Fu says the previous tieration doesn't work anymore with the
 > old Mach VM.  What should we do?  Go back to frobbing PG_CLEAN directly?

You _specifically_ don't frob PG_CLEAN directly, because the pmap can't
lock the vm_page to modify the flags.  That's not allowed by the interface.

The interfaces is:

(VM == Mach VM or UVM)

	- VM asks pmap if page is modified or referenced.

	- VM specifically requests pmap to clear modified or referenced
	  state.

	- pmap does not clear modified or referenced state unless VM
	  requests it.

	- Modified or referenced state is on a per-physical page basis
	  in pmap-specific storage.

"Please make the code follow the interface.  Thanks."

It is true that _mapping_ information is redundant, and may be thrown away
by the pmap at any time (it will simply be reconstructed when a fault
occurs), but mod/ref (_especially_ modified) _MUST_ be rememberd by
the pmap given the way the interface is currently defined.

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                            Home: +1 408 866 1912
NAS: M/S 258-5                                       Work: +1 650 604 0935
Moffett Field, CA 94035                             Pager: +1 650 940 5942