From owner-svn-src-all@FreeBSD.ORG Fri Jan 20 00:46:12 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82B54106564A; Fri, 20 Jan 2012 00:46:12 +0000 (UTC) (envelope-from listlog2011@gmail.com) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6C65B8FC08; Fri, 20 Jan 2012 00:46:12 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0K0k9J7045739; Fri, 20 Jan 2012 00:46:10 GMT (envelope-from listlog2011@gmail.com) Message-ID: <4F18B951.6080404@gmail.com> Date: Fri, 20 Jan 2012 08:46:09 +0800 From: David Xu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: Bruce Evans References: <201201160615.q0G6FE9r019542@svn.freebsd.org> <4F178CDC.3030807@gmail.com> <4F17B0DE.3060008@gmail.com> <201201191023.28426.jhb@freebsd.org> <20120120030456.O1411@besplex.bde.org> In-Reply-To: <20120120030456.O1411@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, davidxu@FreeBSD.org, John Baldwin Subject: Re: svn commit: r230201 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: davidxu@FreeBSD.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jan 2012 00:46:12 -0000 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/ >>> >>> >>> 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.