View previous topic :: View next topic |
Author |
Message |
cybowolf n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Simpsons/Simpsons_-_Santas.jpg)
Joined: 12 Jul 2003 Posts: 43 Location: San Juan, PR
|
Posted: Sat Dec 11, 2004 3:31 pm Post subject: /proc/cpuinfo showing wrong ammount of cache |
|
|
Hi all!
When I cat /proc/cpuinfo, it is showing the wrong ammount of cache for my processor. I have a P4 Extreme Edition w/ 2MB cache (and HT enabled), but cpuinfo is only showing 512k. Was there something specialy I needed to do to get it recognized? Since its not showing up there, does that mean the kernel isn't using anything beyond the 512k? The correct ammount of 2mb does appear in the BIOS though, as well as when I boot into Windows XP.
Thanks all for your help!
-cybowolf
Here is my cpuinfo:
Code: | cujo wolf # cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 3.20GHz
stepping : 5
cpu MHz : 3199.166
cache size : 512 KB
physical id : 0
siblings : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
bogomips : 6324.22
processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 3.20GHz
stepping : 5
cpu MHz : 3199.166
cache size : 512 KB
physical id : 0
siblings : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
bogomips : 6389.76
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
frenkel Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/5863892633fc10143dfad9.gif)
Joined: 13 May 2003 Posts: 1034 Location: .nl
|
Posted: Sat Dec 11, 2004 4:41 pm Post subject: |
|
|
The cache size showed in /proc/cpuinfo is your level 2 cache if I remember correctly... What size is your level 2 cache?
Frank _________________ http://techfield.org |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
markandrew Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 04 Feb 2004 Posts: 176 Location: Manchester, UK
|
Posted: Sat Dec 11, 2004 6:07 pm Post subject: |
|
|
maybe you need to tell the kernel about your cache-size; i have a pentium-m cpu with 1mb cache, and use the following grub args to set it up correctly:
Code: |
kernel (hd0,5)/gentoo-bzImage root=/dev/hda7 vga=0x342 idebus=66 hdc=ide-scsi cachesize=1024
|
(just the cachesize one is relevant, obviously)
which gives:
Code: |
$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 9
model name : Intel(R) Pentium(R) M processor 1700MHz
stepping : 5
cpu MHz : 598.141
cache size : 1024 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr mce cx8 sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 tm pbe est tm2
bogomips : 1182.53
|
Last edited by markandrew on Sat Dec 11, 2004 6:48 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54832 Location: 56N 3W
|
Posted: Sat Dec 11, 2004 6:39 pm Post subject: |
|
|
cybowolf,
CPU cache is invisible to all software, including the kernel.
Software does nothing other than turn it on or off. You can do it from linux if you want but its usually managed in the BIOS.
Cache is a hardware trick to make main memory appear faster than it really is. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
liber! Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 05 Aug 2004 Posts: 123 Location: EU, Antwerp
|
Posted: Sat Dec 11, 2004 6:42 pm Post subject: |
|
|
On my Intel Pentium M the cache size is shown right... (2mb).
Maybe something to do with cpu detection... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
cybowolf n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Simpsons/Simpsons_-_Santas.jpg)
Joined: 12 Jul 2003 Posts: 43 Location: San Juan, PR
|
Posted: Sat Dec 11, 2004 7:31 pm Post subject: |
|
|
Thanks for all the info gang!
Apparently, my cpu has 512k of level 2, and 2048k of level 3. I've read in a few places that at least for the 2.4 kernel, cpuinfo only shows level 2. I have no idea if stands for 2.6.x (am running 2.6.8.1 currently).
However, if cache is completely transparent to the kernel, I guess its no big deal. I just wanted to ensure that my gentoo install was capable of taking full advantage of what I've got.
Out of curiosity, for those with 1mb or 2mb showing up, do you know how much l2 and l3 cache your cpu has?
Thanks!!
-cybowolf |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
markandrew Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 04 Feb 2004 Posts: 176 Location: Manchester, UK
|
Posted: Sat Dec 11, 2004 10:01 pm Post subject: |
|
|
i think my L2 cache is 1mb |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|