Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 09 Nov 2004 10:02:18 -0800
From:      Julian Elischer <julian@elischer.org>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        Stephan Uphoff <ups@tree.com>
Subject:   Re: cvs commit: src/sys/i386/i386 pmap.c
Message-ID:  <4191062A.6090009@elischer.org>
In-Reply-To: <Pine.NEB.3.96L.1041109103037.73102S-100000@fledge.watson.org>
References:  <Pine.NEB.3.96L.1041109103037.73102S-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help


Robert Watson wrote:

>This change made a large difference, and eliminates the unexplained costs.
>Here's a revised table as compared to the above:
>
>	sleep mutex	crit section	spin mutex	new spin mutex
>	UP	SMP	UP	SMP	UP	SMP	UP	SMP
>PIII	21	81	83	81	112	141	95	141
>P4	39	260	120	119	274	342	132	231
>
>So it basically cut 140 cycles off the P4 UP spin lock, 15 off the PIII UP
>spin lock, and 110 cycles off the P4 SMP spin lock.  The PIII SMP spin
>lock looks the same.  Keep in mind that all of these measurements have a
>standard deviation of between 0 and 3 cycles, most in the 1 range.  Also
>keep in mind that these are entirely uncontended measurements.
>
>Assuming that these changes are correct, and pass whatever tests people
>have in mind, this would be a very strong merge candidate for performance
>reasons.  The difference is visible in packet send tests from user space
>as a percentage or two improvement on UP on my P4, although it's a litte
>hard to tell due to the noise. 
>  
>
Can you explain why a spin mutex is more expensive than a sleep mutex (I 
assume this is uncontested)?






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4191062A.6090009>