Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Apr 2009 17:32:06 +0200
From:      Marius Strobl <marius@alchemy.franken.de>
To:        Robert Watson <rwatson@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin <jhb@freebsd.org>
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-...
Message-ID:  <20090420153205.GB59939@alchemy.franken.de>
In-Reply-To: <alpine.BSF.2.00.0904201352230.71062@fledge.watson.org>
References:  <200904192302.n3JN2o6Z023217@svn.freebsd.org> <200904200822.17158.jhb@freebsd.org> <alpine.BSF.2.00.0904201352230.71062@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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