Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/proc/cpuinfo showing wrong ammount of cache
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
cybowolf
n00b
n00b


Joined: 12 Jul 2003
Posts: 43
Location: San Juan, PR

PostPosted: Sat Dec 11, 2004 3:31 pm    Post subject: /proc/cpuinfo showing wrong ammount of cache Reply with quote

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
View user's profile Send private message
frenkel
Veteran
Veteran


Joined: 13 May 2003
Posts: 1034
Location: .nl

PostPosted: Sat Dec 11, 2004 4:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
markandrew
Apprentice
Apprentice


Joined: 04 Feb 2004
Posts: 176
Location: Manchester, UK

PostPosted: Sat Dec 11, 2004 6:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54832
Location: 56N 3W

PostPosted: Sat Dec 11, 2004 6:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
liber!
Tux's lil' helper
Tux's lil' helper


Joined: 05 Aug 2004
Posts: 123
Location: EU, Antwerp

PostPosted: Sat Dec 11, 2004 6:42 pm    Post subject: Reply with quote

On my Intel Pentium M the cache size is shown right... (2mb).

Maybe something to do with cpu detection...
Back to top
View user's profile Send private message
cybowolf
n00b
n00b


Joined: 12 Jul 2003
Posts: 43
Location: San Juan, PR

PostPosted: Sat Dec 11, 2004 7:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
markandrew
Apprentice
Apprentice


Joined: 04 Feb 2004
Posts: 176
Location: Manchester, UK

PostPosted: Sat Dec 11, 2004 10:01 pm    Post subject: Reply with quote

i think my L2 cache is 1mb
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum