From owner-svn-src-all@FreeBSD.ORG Mon Apr 20 15:32:09 2009 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 4099E1065690; Mon, 20 Apr 2009 15:32:09 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id BA05F8FC17; Mon, 20 Apr 2009 15:32:08 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id n3KFW6SB023751; Mon, 20 Apr 2009 17:32:07 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.3/8.14.3/Submit) id n3KFW6uS023750; Mon, 20 Apr 2009 17:32:06 +0200 (CEST) (envelope-from marius) Date: Mon, 20 Apr 2009 17:32:06 +0200 From: Marius Strobl To: Robert Watson Message-ID: <20090420153205.GB59939@alchemy.franken.de> References: <200904192302.n3JN2o6Z023217@svn.freebsd.org> <200904200822.17158.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin Subject: Re: svn commit: r191291 - in head: lib/libthr/thread libexec/rtld-elf/amd64 libexec/rtld-elf/arm libexec/rtld-elf/i386 libexec/rtld-elf/ia64 libexec/rtld-elf/mips libexec/rtld-elf/powerpc libexec/rtld-... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list 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: Mon, 20 Apr 2009 15:32:09 -0000 On Mon, Apr 20, 2009 at 02:00:56PM +0100, Robert Watson wrote: > > On Mon, 20 Apr 2009, John Baldwin wrote: > > >> Now that the kernel defines CACHE_LINE_SIZE in machine/param.h, use > >> that definition in the custom locking code for the run-time linker > >> rather than local definitions. > > > >Perhaps CACHE_LINE_SIZE for ia64 and sparc64 should be 128 since that is > >what rtld used? > > I'm happy with whatever size the platform maintainers would like. I've > changed ia64, sparc64, and sun4v kernel CACHE_LINE_SIZE definitions to 128, > and powerpc was already 128, but left the others at 64 bytes until such > time as we have some useful numbers or informat ionto suggest another > choice would be better. All I'm really looking for here is a baseline > constant to use, I have no particular vested interest in specific values > for the constants. > For sparc64 the cache line size should be ideally determined at runtime using Open Firmware, however I'm not aware of a sun4u CPU having a L1 data- or instruction cache line size greater than 32 bytes though. Some of them have a prefetch cache with a line size of 64 bytes though which besides for the prefetch instructions is used autonomously by the CPU when fetching from the L2 cache (which can have a line size of up to 512 bytes AFAICT). I'm not aware how relevant this is for the intended use of CACHE_LINE_SIZE, but a value of of 64 seems appropriate for sparc64 in order also cover the prefetch cache. Marius