Subject: Non-optimial "access type" handing in pmap_enter()?
To: None <>
From: Jason R Thorpe <>
List: port-arm
Date: 01/31/2002 10:33:30

While elbow-deep in the pmap to work out the cache issues, I noticed
that we seem to not handle "access type" quite correctly.

Take a look at line 2833 of pmap.c,v 1.36.

What we do here is:

	if write access, mark page ref+mod, and allow page writes.
	else if read access, mark page ref, and allow read access.
	else don't allow any access.

This is non-optimal for the case where a page is already modified or
referenced by another mapping.

Consider the case of libc -- it's likely that many pages will be at least
referenced, and so when UVM pre-faults pages around an actual faulting
page (by default, the faulting page is considered the "middle" of a fault
area, and it also faults in a few pages being and ahead of the middle),
even though there is no access type passed for those pmap_enter() calls,
if those pages are already referenced, the redundant page fault should be
avoided later when they are.  (This is whole point of pre-faulting those
pages :-)

        -- Jason R. Thorpe <>