Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jan 2012 08:46:09 +0800
From:      David Xu <listlog2011@gmail.com>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, davidxu@FreeBSD.org, John Baldwin <jhb@FreeBSD.org>
Subject:   Re: svn commit: r230201 - head/lib/libc/gen
Message-ID:  <4F18B951.6080404@gmail.com>
In-Reply-To: <20120120030456.O1411@besplex.bde.org>
References:  <201201160615.q0G6FE9r019542@svn.freebsd.org> <4F178CDC.3030807@gmail.com> <4F17B0DE.3060008@gmail.com> <201201191023.28426.jhb@freebsd.org> <20120120030456.O1411@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2012/1/20 0:55, Bruce Evans wrote:
> On Thu, 19 Jan 2012, John Baldwin wrote:
>
>> On Thursday, January 19, 2012 12:57:50 am David Xu wrote:
>>> rdtsc() may not work on SMP, so I have updated it to use clock_gettime
>>> to get total time.
>>> http://people.freebsd.org/~davidxu/bench/semaphore2/
>>> <http://people.freebsd.org/%7Edavidxu/bench/semaphore2/>;
>>>
>>> Still, lfence is a lot faster than atomic lock.
>
> I hope it does non-microbenchmarks.  IIRC, jhb found that it was
> actually slower in some cases.  I only did micro-benchmarks on Athlon64.

It depends on hardware, if it is a large machine with lots of cpu,
a small conflict on dual-core machine can become a large conflict
on large machine because it is possible more cpus are now
running same code which becomes a bottleneck. On a large machine
which has 1024 cores, many code need to be redesigned.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F18B951.6080404>