optimize msleep with PCATCH flag
David Xu
davidxu at freebsd.org
Sat May 20 01:36:05 UTC 2006
Hi,
Here is a patch to reduce overhead when PCATCH flag is set
for msleep.
http://people.freebsd.org/~davidxu/patch/PCATCH_optimize.patch
I use SUN's mutex ping-pong program to test it, source code
is here: http://people.freebsd.org/~davidxu/bench/pp.c
I have tested it on a dual PIII machine, with command:
./pp -v -s system -n 4
Here is the result before and after the patch:
x plain_PCATCH.txt
+ PCATCH_optimized.txt
+--------------------------------------------------------------------------+
|+ + + x ++ +* xx x x * x|
| |__________________A__|M___________M_|______________| |
+--------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 8 35311 41714 37750.5 38101 1954.5673
+ 8 32191 39802 36179 35670.125 2401.755
Difference at 95.0% confidence
-2430.88 +/- 2348.35
-6.38008% +/- 6.1635%
(Student's t, pooled s = 2189.61)
David Xu
More information about the freebsd-threads
mailing list