optimize msleep with PCATCH flag
Julian Elischer
julian at elischer.org
Sat May 20 01:49:55 UTC 2006
David Xu wrote:
>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
>_______________________________________________
>freebsd-threads at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-threads
>To unsubscribe, send any mail to "freebsd-threads-unsubscribe at freebsd.org"
>
>
looks like you need to do a lot more samples to get a better error
value.. (8 may not be enough)
More information about the freebsd-threads
mailing list