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-...

Marius Strobl marius at alchemy.franken.de
Mon Apr 20 15:32:09 UTC 2009


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



More information about the svn-src-head mailing list