Subject: Re: pmap tweak sanity check
To: Chris Gilbert <>
From: Jason R Thorpe <>
List: port-arm
Date: 11/12/2002 10:58:37
On Tue, Nov 12, 2002 at 04:15:25PM -0000, Chris Gilbert wrote:

 > An optimisation I've just thought of, is it worth adding flags to the
 > pvh_attrs field of the vm_page_md stuff that indicates that all entries in
 > this vm_page list are readonly and therefore all cacheable?  that way when
 > we add a new readonly pv to the list we don't have to walk the list, we
 > just add it in.

I'd use counters -- a flag might require a traversal of the list again
to update the flag.  A counter would not.

Maybe use:

	- kernel-writable
	- user-writable
	- read-only

as the counters?  This way you only need to incr/decr the counters, and
check them for != 0.  Counters should be unsigned, and sprinkle some
KDASSERT()s in there to detect underflow.

        -- Jason R. Thorpe <>