Subject: pmap tweak sanity check
To: None <port-arm@netbsd.org>
From: Chris Gilbert <chris@dokein.co.uk>
List: port-arm
Date: 11/12/2002 11:10:02
This is a multi-part message in MIME format.

--Multipart_Tue__12_Nov_2002_11:10:02_+0000_08171200
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Hi,

I've a minor tweak to the current pmap, but want to check I'm not
missing something subtle about vac_me_user.  The patch is attached,
basically the patch is using the knowledge that we know how many
cacheable entries we've got, so don't bother walking the pv list if we
know that all the entries are already cacheable.  (note the entries > 0
is not needed as if entries == 0, then cacheable entries == 0)

Note minimal difference in my nominal benchmark of time make configure
(post make patch) it's now about 2:07.35 compared with 2:07.90
previously, woohoo .55 of a second...

I've got a few other mad ideas on how to improve pmap performance, eg
trying to sort out the APTE aliasing issues (oh what fun that'll be 8)

Chris
--Multipart_Tue__12_Nov_2002_11:10:02_+0000_08171200
Content-Type: text/plain;
 name="pmap.c.vac_user.diff.txt"
Content-Disposition: attachment;
 filename="pmap.c.vac_user.diff.txt"
Content-Transfer-Encoding: 7bit

Index: pmap.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/arm/arm32/pmap.c,v
retrieving revision 1.121
diff -u -p -r1.121 pmap.c
--- pmap.c	2002/11/11 20:34:03	1.121
+++ pmap.c	2002/11/12 10:59:46
@@ -2303,7 +2303,7 @@ pmap_vac_me_user(struct pmap *pmap, stru
 			cpu_tlb_flushID();
 		}
 		cpu_cpwait();
-	} else if (entries > 0) {
+	} else if (entries != cacheable_entries) {
 		/*
 		 * Turn cacheing back on for some pages.  If it is a kernel
 		 * page, only do so if there are no other writable pages.

--Multipart_Tue__12_Nov_2002_11:10:02_+0000_08171200--