Subject: Re: SMP improvements for pmap
To: Stephan Uphoff <ups@stups.com>
From: Chuck Silvers <chuq@chuq.com>
List: port-i386
Date: 06/02/2003 08:19:35
hi,

On Fri, May 30, 2003 at 08:38:28PM -0400, Stephan Uphoff wrote:
> Can the following functions: 
>                                pmap_enter(),
>                                pmap_remove(),
>                                pmap_unwire(),
>                                pmap_write_protect(),
> 
> execute concurrently for the same virtual address range using 
> the kernel pmap ( pmap_kernel() ) ?
> 
> My feeling is that there are some circumstances - and that fixing
> the resulting race conditions in these functions will require some
> ugly locking logic. 
> 
> Could someone please tell me that I am wrong ;-)

I think jason's right that the kernel address space will be locked at
a higher level.  you could add some debug code to verify this if you want,
though.


> I am also looking for some good benchmarks.
> CPU usage for sequential block input in bonnie drops from 15-16%
> to 10-11% using the patched pmap on my SMP machine. (Same throughput)
> However bonnie is clearly not the right benchmark.

actually I'd think bonnie would be as meaningful as anything else.
the fact that it shows such a dramatic difference is very encouraging.

a fork+exit or fork+exec+exit microbenchmark exercises the pmap a bunch,
you could try hbench or lmbench (though it might be better to roll your own
if you're trying to expose MP performance).

some network tests would be good as well.
"build.sh -j ... release" would also be a fine thing to compare.

-Chuck