Date: Sat, 11 Apr 2009 09:39:47 -0700 From: Jason Evans <jasone@FreeBSD.org> To: Robert Watson <rwatson@FreeBSD.org> Cc: arch@FreeBSD.org Subject: Re: Simple #define for cache line size Message-ID: <49E0C7D3.1010005@FreeBSD.org> In-Reply-To: <alpine.BSF.2.00.0904111700241.19879@fledge.watson.org> References: <alpine.BSF.2.00.0904111700241.19879@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Robert Watson wrote: > Index: arm/include/param.h > =================================================================== > --- arm/include/param.h (revision 190941) > +++ arm/include/param.h (working copy) > @@ -81,6 +81,10 @@ > #define ALIGNBYTES _ALIGNBYTES > #define ALIGN(p) _ALIGN(p) > > +#ifndef CACHE_LINE_SIZE > +#define CACHE_LINE_SIZE 64 > +#endif > + > #define PAGE_SHIFT 12 > #define PAGE_SIZE (1 << PAGE_SHIFT) /* Page size */ > #define PAGE_MASK (PAGE_SIZE - 1) > Index: powerpc/include/param.h It would be helpful to instead do: #ifndef CACHE_LINE_SHIFT #define CACHE_LINE_SHIFT 6 #endif #define CACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT) In particular, src/lib/libc/stdlib/malloc.c would benefit. Thanks, Jason
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49E0C7D3.1010005>