Subject: Re: cpu_switch (was Re: 1.5 Release documentation ...)
To: None <rearnsha@arm.com>
From: Neil A. Carson <neil@causality.com>
List: port-arm32
Date: 11/07/2000 10:50:00
Richard Earnshaw wrote:

> IMHO It's still a mess and needs a rewrite from the ground up.  I've done
> some hacks at home and managed to remove approximately 90% of the cache
> flush calls from some routines; but we are still flushing the cache far
> too often and the impact of the changes I've made is not as significant as
> one might expect from the headline figure.

Which routines - are you sure they are correct?

You are right that process exit is the last one. A long time ago I
suggested the FreeBSD optimisation of cleaning the whole thing out in
one go (especially since even on x86 for large proceses traversing the
tables in pmap_remove for hunge hunks of process just nicely flushes
parts of the cache for you!) which would mean you could do one flush per
exit on ARM. Even on x86 for FreeBSD this made big scalability
improvements.

Can't remember what happened to that.

Also another thing was some changes I hacked to make the page tables
temporarily cacheable to make remove function faster. Made some
difference but with above change this would probably not be necessary.

It's all ugly stuff. I sure think the pmap can be rewritten to tidy it
up a lot, but I'm not sure you'll win much on performance. I think my
changes a few years ago had got 80% of the performance win with 20% of
the pain.

	N.