Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 May 2006 18:49:54 -0700
From:      Julian Elischer <julian@elischer.org>
To:        David Xu <davidxu@freebsd.org>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: optimize msleep with PCATCH flag
Message-ID:  <446E75C2.4080305@elischer.org>
In-Reply-To: <200605200935.54828.davidxu@freebsd.org>
References:  <200605200935.54828.davidxu@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-threads
>To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org"
>  
>
looks like you need to do a lot more samples to get a better error 
value.. (8 may not be enough)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?446E75C2.4080305>