Simple #define for cache line size

Ivan Voras ivoras at freebsd.org
Mon Apr 13 14:02:13 PDT 2009


Robert Watson wrote:

> --- i386/include/param.h    (revision 190941)
> +++ i386/include/param.h    (working copy)
> @@ -74,6 +74,10 @@
>  #define ALIGNBYTES    _ALIGNBYTES
>  #define ALIGN(p)    _ALIGN(p)
> 
> +#ifndef CACHE_LINE_SIZE
> +#define    CACHE_LINE_SIZE    64
> +#endif

Wouldn't it be better to continue the

cpu             I486_CPU
cpu             I586_CPU
cpu             I686_CPU

series of defines in kernel configuration and define alignment per CPU
architecture? I guess it depends on the trends - are cache lines
expected to change in the near future? :)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20090413/aff49596/signature.pgp


More information about the freebsd-arch mailing list