Lshw: L2 cache size vs capacity

gypsy_rabbi

Distinguished
Jul 3, 2010
3
0
18,510
Hi all,

I just bought a laptop with a T4400. On Linux, looking through lshw output turned up the following for the L2 cache:
[cpp] *-cache:1
description: L2 cache
physical id: 6
slot: L2 Cache
size: 1MiB # <--- SIZE
capacity: 4MiB # <--- CAPACITY
capabilities: burst internal write-back unified[/cpp]
I'm curious as to why the size (1Mib) and capacity (4MiB) are different. Surely it can't be possible to stick something on the CPU to increase the L2 cache size, right?? So what does this mean?

I'm running 64-bit Ubuntu Linux. The kernel config says CONFIG_X86_L1_CACHE_BYTES=64 but I found nothing about the L2 cache.

Any idea what this is about? Can I somehow unlock more cache to get a 4MiB L2 cache for free? :)

Thanks,

GR
 
Solution
My guess is linux is showing you the capacity of the l2 cache (total on the die) of 4mb and the usable size (available cache) of 1mb.
What I mean by that, is the pentium dual cores are just core 2s with locked l2 cache (4mb for the core 2s the pentium dual core 4xxx series is derived from) so linux is just showing you the total physical amount of l2 cache, and the usable l2 cache as well.
G

Guest

Guest
*-cpu
product: Intel(R) Pentium(R) 4 CPU 1.70GHz
vendor: Intel Corp.
physical id: 1
bus info: cpu@0
version: 15.1.2
size: 1700MHz
width: 32 bits
capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm up pebs bts
configuration: id=0
*-cache:0
description: L1 cache
physical id: 0
size: 8KiB
*-cache:1
description: L2 cache
physical id: 1
size: 256KiB

Thats the readout from my Pentium 4, not so sure whats going on with yours. I would assume a software error seeing your T4400 has 1mb L2.
 

pepperman

Distinguished
Sep 15, 2009
1,105
0
19,460
My guess is linux is showing you the capacity of the l2 cache (total on the die) of 4mb and the usable size (available cache) of 1mb.
What I mean by that, is the pentium dual cores are just core 2s with locked l2 cache (4mb for the core 2s the pentium dual core 4xxx series is derived from) so linux is just showing you the total physical amount of l2 cache, and the usable l2 cache as well.
 
Solution

gypsy_rabbi

Distinguished
Jul 3, 2010
3
0
18,510


Thanks, guys, and especially pepperman. I didn't know the T4400s are locked Core 2s. For anyone else interested in this: a bit more googling suggested that unlocking L2 cache on binned CPUs used to be easier until around 2003 but is now a serious/impossible mod on Intel CPUs. Might be easier on some AMDs ("Advanced Clock Calibration" might be a good place to start your googling).

Very good to know. Thanks again.

GR