Re: L1_CACHE_SHIFT value for P4 ?

From: Andi Kleen (ak@suse.de)
Date: Thu Nov 21 2002 - 08:10:02 EST


Margit Schubert-While <margit@margit.com> writes:

E> What should be the value of L1_CACHE_SHIFT for a P4 ?
> L1_CACHE_BYTES is set to 1<<L1_CACHE_SHIFT
>
> In the .config , I notice that L1_CACHE_SHIFT is being set to 7 for the P4.
> Surely that can't be right or ?

The P4 has 128byte L2 cache lines (2^7). The L1 apparently has smaller lines.

For practical reasons the L1_CACHE_BYTES defines should not be smaller than
the L2 line size - otherwise slab's cache colouring would not be very
effective. In fact the symbol is a bit misnamed, it refers to all CPU caches.
So it needs to be 7.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:36 EST