Subject: Re: pmap tweak sanity check
To: Chris Gilbert <chris@dokein.co.uk>
From: Richard Earnshaw <rearnsha@arm.com>
List: port-arm
Date: 11/12/2002 12:26:03
> 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
> 
> 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.
> 


It might be clearer to write it as entries > cacheable_entries, but yes, 
this should be OK.

R.