2007-02-02 11:11:31

by Francis Moreau

[permalink] [raw]
Subject: Slower CPU frequency reported by the kernel

Hi,

I'm using a PC with AMD 64 3000+ cpu which is theoricaly running at
2Ghz. But when looking at /proc/cpuinfo, the kernel reports that it
runs only at 1Ghz:

# cat /proc/cpuinfo

processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 12
model name : AMD Athlon(tm) 64 Processor 3000+
stepping : 0
cpu MHz : 1000.000
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm
3dnowext 3dnow ts fid vid ttp
bogomips : 2004.89

I tried with a 2.6.20-rc7 kernel and still have the same.

What's going wrong ?

thanks
--
Francis


Attachments:
(No filename) (863.00 B)
config (58.17 kB)
Download all attachments

2007-02-02 12:04:27

by Paolo Ornati

[permalink] [raw]
Subject: Re: Slower CPU frequency reported by the kernel

On Fri, 2 Feb 2007 12:11:25 +0100
"Francis Moreau" <[email protected]> wrote:

> Hi,
>
> I'm using a PC with AMD 64 3000+ cpu which is theoricaly running at
> 2Ghz. But when looking at /proc/cpuinfo, the kernel reports that it
> runs only at 1Ghz:
>
> # cat /proc/cpuinfo
>
> processor : 0
> vendor_id : AuthenticAMD
> cpu family : 15
> model : 12
> model name : AMD Athlon(tm) 64 Processor 3000+
> stepping : 0
> cpu MHz : 1000.000
> cache size : 512 KB
> fdiv_bug : no
> hlt_bug : no
> f00f_bug : no
> coma_bug : no
> fpu : yes
> fpu_exception : yes
> cpuid level : 1
> wp : yes
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm
> 3dnowext 3dnow ts fid vid ttp
> bogomips : 2004.89
>
> I tried with a 2.6.20-rc7 kernel and still have the same.
>
> What's going wrong ?


You are using frequency scaling(*) and "/proc/cpuinfo" reflects the
current speed.


(*) =
#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
CONFIG_CPU_FREQ_DEBUG=y
CONFIG_CPU_FREQ_STAT=m
CONFIG_CPU_FREQ_STAT_DETAILS=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=m
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m


Read "Documentation/cpu-freq/user-guide.txt" for more info.

--
Paolo Ornati
Linux 2.6.20-rc7 on x86_64

2007-02-02 13:14:08

by Jesper Juhl

[permalink] [raw]
Subject: Re: Slower CPU frequency reported by the kernel

On 02/02/07, Paolo Ornati <[email protected]> wrote:
> On Fri, 2 Feb 2007 12:11:25 +0100
> "Francis Moreau" <[email protected]> wrote:
>
> > Hi,
> >
> > I'm using a PC with AMD 64 3000+ cpu which is theoricaly running at
> > 2Ghz. But when looking at /proc/cpuinfo, the kernel reports that it
> > runs only at 1Ghz:
> >
I agree that that is the most logical explanation, but in theory it
could also be that he has changed bios settings and underclocked the
processor.

--
Jesper Juhl <[email protected]>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html

2007-02-02 13:48:59

by Francis Moreau

[permalink] [raw]
Subject: Re: Slower CPU frequency reported by the kernel

Hi

On 2/2/07, Jesper Juhl <[email protected]> wrote:
> I agree that that is the most logical explanation, but in theory it
> could also be that he has changed bios settings and underclocked the
> processor.
>

no I didn't

thanks
--
Francis

2007-02-02 14:03:34

by Francis Moreau

[permalink] [raw]
Subject: Re: Slower CPU frequency reported by the kernel

On 2/2/07, Paolo Ornati <[email protected]> wrote:
>
> You are using frequency scaling(*) and "/proc/cpuinfo" reflects the
> current speed.
>

ok, I didn't know about this.

>
> (*) =
> #
> # CPU Frequency scaling
> #
> CONFIG_CPU_FREQ=y
> CONFIG_CPU_FREQ_TABLE=y
> CONFIG_CPU_FREQ_DEBUG=y
> CONFIG_CPU_FREQ_STAT=m
> CONFIG_CPU_FREQ_STAT_DETAILS=y
> # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
> CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y

it's seems that the cpu freq scaling depends on a user space tool.
Could you tell me how I can find if there're such tools installed on
my computer ?

thanks
--
Francis

2007-02-02 14:20:14

by Arjan van de Ven

[permalink] [raw]
Subject: Re: Slower CPU frequency reported by the kernel


> it's seems that the cpu freq scaling depends on a user space tool.
> Could you tell me how I can find if there're such tools installed on
> my computer ?

it may be userspace, or you may be using the "ondemand" governer. If you
have the userspace tool it's often called "cpuspeed", but it depends on
your distro.

--
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org

2007-02-02 14:33:30

by Paolo Ornati

[permalink] [raw]
Subject: Re: Slower CPU frequency reported by the kernel

On Fri, 2 Feb 2007 15:03:31 +0100
"Francis Moreau" <[email protected]> wrote:

> it's seems that the cpu freq scaling depends on a user space tool.

Yes, it depends on the selected governor.

In the case of "userspace" governor you (or a program) can set the speed
writing to "/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed".

Usually a deamon monitor the CPU usage and increase the frequency when
you need it.


> Could you tell me how I can find if there're such tools installed on
> my computer ?

"ps -A" and look for something like "cpufreqd"

There are different deamon for this: cpufreqd, cpudyn...

Anyway it is started by an init script, so you should find it looking
at "ls /etc/init.d/".

--
Paolo Ornati
Linux 2.6.20-rc7 on x86_64

2007-02-02 15:27:09

by Francis Moreau

[permalink] [raw]
Subject: Re: Slower CPU frequency reported by the kernel

On 2/2/07, Arjan van de Ven <[email protected]> wrote:
> it may be userspace, or you may be using the "ondemand" governer. If you
> have the userspace tool it's often called "cpuspeed", but it depends on
> your distro.

you're right, I actually use 'ondemand' governer. It seems to be the
governer used by Fedora when the cpu is a AMD 64 3000+

thanks
--
Francis

2007-02-02 15:31:38

by Francis Moreau

[permalink] [raw]
Subject: Re: Slower CPU frequency reported by the kernel

On 2/2/07, Paolo Ornati <[email protected]> wrote:
> Anyway it is started by an init script, so you should find it looking
> at "ls /etc/init.d/".
>

thanks for these information. I'm using a Fedora distrib and it
actually uses 'ondemand' governer with the cpu I use.

--
Francis

2007-02-03 12:25:08

by lnx.tmp

[permalink] [raw]
Subject: Re: Slower CPU frequency reported by the kernel

On Fri, 02 Feb 2007 12:11:25 +0100, Francis Moreau wrote:
> Hi,
>
> I'm using a PC with AMD 64 3000+ cpu which is theoricaly running at
> 2Ghz. But when looking at /proc/cpuinfo, the kernel reports that it
> runs only at 1Ghz:
> ...
> What's going wrong ?

Do you have feature called "Cool N' Quiet" enabled in BIOS?
I had the same problem and disabling the feature the problem resolved.

2007-02-03 13:01:18

by Di, Wu

[permalink] [raw]
Subject: Re: Slower CPU frequency reported by the kernel

maybe, you start a powersaved service, and enable the cpufreq module of
kernel. You need run "powersave -f" for fix your CPU to highest
frequency supported.

On Sat, 2007-02-03 at 12:19 +0000, [email protected] wrote:
> On Fri, 02 Feb 2007 12:11:25 +0100, Francis Moreau wrote:
> > Hi,
> >
> > I'm using a PC with AMD 64 3000+ cpu which is theoricaly running at
> > 2Ghz. But when looking at /proc/cpuinfo, the kernel reports that it
> > runs only at 1Ghz:
> > ...
> > What's going wrong ?
>
> Do you have feature called "Cool N' Quiet" enabled in BIOS?
> I had the same problem and disabling the feature the problem resolved.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>


2007-02-06 18:38:57

by Langsdorf, Mark

[permalink] [raw]
Subject: RE: Slower CPU frequency reported by the kernel

> > I'm using a PC with AMD 64 3000+ cpu which is theoricaly running at
> > 2Ghz. But when looking at /proc/cpuinfo, the kernel reports that it
> > runs only at 1Ghz:
> > ...
> > What's going wrong ?
>
> Do you have feature called "Cool N' Quiet" enabled in BIOS?
> I had the same problem and disabling the feature the problem resolved.

Linux reports the frequency the processor is currently running at.
Cool N' Quiet is a feature that allows the processor to run at a
lower frequency and voltage when it is idle, thereby saving you
power and letting your fans run slower and quieter. Don't turn it
off.

-Mark Langsdorf
AMD, Inc.


2007-02-07 09:40:05

by Andi Kleen

[permalink] [raw]
Subject: Re: Slower CPU frequency reported by the kernel

"Francis Moreau" <[email protected]> writes:
>
> What's going wrong ?

Nothing. It's a feature that saves you enegery (=money) and noise when
the computer doesn't have much to do.

-Andi