* question about scailing CPU frequency
[not found] <CABgotTJO-_PppTW_1cqmsgV-0VQcK=BdQ76jXWg-M2gTxNOVgA@mail.gmail.com>
@ 2011-10-18 2:30 ` sabrina chang
2011-10-20 4:48 ` Thomas Renninger
0 siblings, 1 reply; 3+ messages in thread
From: sabrina chang @ 2011-10-18 2:30 UTC (permalink / raw)
To: cpufreq
hello,
I have some questions about scailing CPU frequency.
I want to create an environment with 1 higher CPU frequency and 3
lower CPU frequency on Fedora system(linux kernel 2.6.32) with
acpi-cpufreq driver (Intel Core i7-920 Processor).
****************************************************************************************************
this is the cpufreq-info report:
cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0 1 2 3
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 10.0 us.
hardware limits: 1.60 GHz - 2.67 GHz
available frequency steps: 2.67 GHz, 2.53 GHz, 2.40 GHz, 2.27 GHz,
2.13 GHz, 2.00 GHz, 1.87 GHz, 1.73 GHz, 1.60 GHz
available cpufreq governors: ondemand, userspace, performance
current policy: frequency should be within 1.60 GHz and 2.67 GHz.
The governor "userspace" may decide which speed to use
within this range.
current CPU frequency is 2.67 GHz (asserted by call to hardware).
analyzing CPU 1:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0 1 2 3
CPUs which need to have their frequency coordinated by software: 1
maximum transition latency: 10.0 us.
hardware limits: 1.60 GHz - 2.67 GHz
available frequency steps: 2.67 GHz, 2.53 GHz, 2.40 GHz, 2.27 GHz,
2.13 GHz, 2.00 GHz, 1.87 GHz, 1.73 GHz, 1.60 GHz
available cpufreq governors: ondemand, userspace, performance
current policy: frequency should be within 1.60 GHz and 2.67 GHz.
The governor "userspace" may decide which speed to use
within this range.
current CPU frequency is 2.67 GHz (asserted by call to hardware).
analyzing CPU 2:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0 1 2 3
CPUs which need to have their frequency coordinated by software: 2
maximum transition latency: 10.0 us.
hardware limits: 1.60 GHz - 2.67 GHz
available frequency steps: 2.67 GHz, 2.53 GHz, 2.40 GHz, 2.27 GHz,
2.13 GHz, 2.00 GHz, 1.87 GHz, 1.73 GHz, 1.60 GHz
available cpufreq governors: ondemand, userspace, performance
current policy: frequency should be within 1.60 GHz and 2.67 GHz.
The governor "userspace" may decide which speed to use
within this range.
current CPU frequency is 2.67 GHz (asserted by call to hardware).
analyzing CPU 3:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0 1 2 3
CPUs which need to have their frequency coordinated by software: 3
maximum transition latency: 10.0 us.
hardware limits: 1.60 GHz - 2.67 GHz
available frequency steps: 2.67 GHz, 2.53 GHz, 2.40 GHz, 2.27 GHz,
2.13 GHz, 2.00 GHz, 1.87 GHz, 1.73 GHz, 1.60 GHz
available cpufreq governors: ondemand, userspace, performance
current policy: frequency should be within 1.60 GHz and 2.67 GHz.
The governor "userspace" may decide which speed to use
within this range.
current CPU frequency is 2.67 GHz (asserted by call to hardware).
****************************************************************************************************
When I want to create the environment I want, the lower freq. always
sync with the higher freq.
It means that as long as one CPU frequency is higher, the rest lower
freq will adjust to the higher freq. even I set them to the lower
freq.
From the cpufreq-info report, it seems they are using hardware
coordination, not software coordination.
I saw some other articles talking about we can choose which coordination to use.
Do you know how to setting to software coordination, even if the power
do not save any consumption is ok.
I want the different speed of CPU for experiment.
Thanks for your listening!
BR,
Sabrina
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: question about scailing CPU frequency
2011-10-18 2:30 ` question about scailing CPU frequency sabrina chang
@ 2011-10-20 4:48 ` Thomas Renninger
[not found] ` <CABgotTKRyXA=SVogC0qBTu+8L3QKPsJg_KecY3CLMGMz_jXnxA@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Renninger @ 2011-10-20 4:48 UTC (permalink / raw)
To: sabrina chang; +Cc: cpufreq
On Tuesday 18 October 2011 04:30:01 sabrina chang wrote:
> hello,
> I have some questions about scailing CPU frequency.
> I want to create an environment with 1 higher CPU frequency and 3
> lower CPU frequency on Fedora system(linux kernel 2.6.32) with
> acpi-cpufreq driver (Intel Core i7-920 Processor).
> ****************************************************************************************************
> this is the cpufreq-info report:
> cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009
> Report errors and bugs to cpufreq@vger.kernel.org, please.
> analyzing CPU 0:
> driver: acpi-cpufreq
> CPUs which run at the same hardware frequency: 0 1 2 3
> CPUs which need to have their frequency coordinated by software: 0
> maximum transition latency: 10.0 us.
> hardware limits: 1.60 GHz - 2.67 GHz
> available frequency steps: 2.67 GHz, 2.53 GHz, 2.40 GHz, 2.27 GHz,
> 2.13 GHz, 2.00 GHz, 1.87 GHz, 1.73 GHz, 1.60 GHz
> available cpufreq governors: ondemand, userspace, performance
> current policy: frequency should be within 1.60 GHz and 2.67 GHz.
> The governor "userspace" may decide which speed to use
> within this range.
> current CPU frequency is 2.67 GHz (asserted by call to hardware).
...
> ****************************************************************************************************
> When I want to create the environment I want, the lower freq. always
> sync with the higher freq.
So you want, if for example cpufreq subsystem currently would set:
1.2G
2.0G
like to have both cores set to 2.0G?
This is what would really happen on an AMD core where HW frequency dependencies
exist and different freqs are applied and I expect it's same/similar on Intel.
I do not think it's very useful, but you could hardcode to add all cores
to the software cpumask (acpi-cpufreq.c):
if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL ||
policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) {
cpumask_copy(policy->cpus, perf->shared_cpu_map);
}
Instead of perf->shared_cpu_map you could use all online cpus (cpu_online_mask).
Due to possible HW dependencies and to make sure they got correctly exported by
BIOS (_PSD ACPI func) and due to the fact that latest CPUs can boost which you
cannot control, which you even can only measure over a period of time (you don't
know at which freq your currently are) you should use mperf (in cpufrequtils)
or better latest cpupower monitor feature.
They show you the frequency your cores were really in.
Real HW frequency might behave rather different than you'd expect it.
Thomas
> It means that as long as one CPU frequency is higher, the rest lower
> freq will adjust to the higher freq. even I set them to the lower
> freq.
> From the cpufreq-info report, it seems they are using hardware
> coordination, not software coordination.
> I saw some other articles talking about we can choose which coordination to use.
> Do you know how to setting to software coordination, even if the power
> do not save any consumption is ok.
> I want the different speed of CPU for experiment.
> Thanks for your listening!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Fwd: question about scailing CPU frequency
[not found] ` <CABgotTKRyXA=SVogC0qBTu+8L3QKPsJg_KecY3CLMGMz_jXnxA@mail.gmail.com>
@ 2011-10-24 6:18 ` sabrina chang
0 siblings, 0 replies; 3+ messages in thread
From: sabrina chang @ 2011-10-24 6:18 UTC (permalink / raw)
To: cpufreq
Hi, Thomas
thanks for your reply!
Yes, I want an environment like: one 2GHz and three 1GHz.
in this function: acpi_cpufreq_cpu_init
my computer did not go through
if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL ||
policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) {
cpumask_copy(policy->cpus, perf->shared_cpu_map);
}
the policy's shared_type has 4 possibility:
#define CPUFREQ_SHARED_TYPE_NONE (0) /* None */
#define CPUFREQ_SHARED_TYPE_HW (1) /* HW does needed coordination */
#define CPUFREQ_SHARED_TYPE_ALL (2) /* All dependent CPUs should set freq */
#define CPUFREQ_SHARED_TYPE_ANY (3) /* Freq can be set from any dependent CPU*/
I guess my environment's policy->shared_type may be CPUFREQ_SHARED_TYPE_HW ?
I set the government to userspace, and change the frequency.
this function, acpi_cpufreq_target, is use to change the frequency.
my environment will enter the if loop
if (policy->shared_type != CPUFREQ_SHARED_TYPE_ANY)
cmd.mask = policy->cpus;
else
cmd.mask = cpumask_of(policy->cpu);
so the mask is set to the CPUs requiring sw coordination
hence, when I setting the frequency of core 0, only core 0 will do
cpufreq_notify_transition
then, change the frequency.
I use printk to debug, the result is like what I think.
My problem is:
now, all cores' government are userspace
all cores' frequency is 1.6 GHz
when I set core 0 to 2 GHz, my debugging msg tell me only core 0 go
through acpi_cpufreq_target's cpufreq_notify_transition
But the others will become 2 GHz!
is this because my policy->shared_type is CPUFREQ_SHARED_TYPE_HW??
is this function acpi_processor_get_psd to set the shared_type?
you mention about BIOS (_PSD ACPI func)?
what is this? may I change the shared_type?
sry my expression is not good...
BR,
Sabrina
2011/10/20 Thomas Renninger <trenn@suse.de>
>
> On Tuesday 18 October 2011 04:30:01 sabrina chang wrote:
> > hello,
> > I have some questions about scailing CPU frequency.
> > I want to create an environment with 1 higher CPU frequency and 3
> > lower CPU frequency on Fedora system(linux kernel 2.6.32) with
> > acpi-cpufreq driver (Intel Core i7-920 Processor).
> > ****************************************************************************************************
> > this is the cpufreq-info report:
> > cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009
> > Report errors and bugs to cpufreq@vger.kernel.org, please.
> > analyzing CPU 0:
> > driver: acpi-cpufreq
> > CPUs which run at the same hardware frequency: 0 1 2 3
> > CPUs which need to have their frequency coordinated by software: 0
> > maximum transition latency: 10.0 us.
> > hardware limits: 1.60 GHz - 2.67 GHz
> > available frequency steps: 2.67 GHz, 2.53 GHz, 2.40 GHz, 2.27 GHz,
> > 2.13 GHz, 2.00 GHz, 1.87 GHz, 1.73 GHz, 1.60 GHz
> > available cpufreq governors: ondemand, userspace, performance
> > current policy: frequency should be within 1.60 GHz and 2.67 GHz.
> > The governor "userspace" may decide which speed to use
> > within this range.
> > current CPU frequency is 2.67 GHz (asserted by call to hardware).
> ...
> > ****************************************************************************************************
> > When I want to create the environment I want, the lower freq. always
> > sync with the higher freq.
> So you want, if for example cpufreq subsystem currently would set:
> 1.2G
> 2.0G
> like to have both cores set to 2.0G?
> This is what would really happen on an AMD core where HW frequency dependencies
> exist and different freqs are applied and I expect it's same/similar on Intel.
>
> I do not think it's very useful, but you could hardcode to add all cores
> to the software cpumask (acpi-cpufreq.c):
> if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL ||
> policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) {
> cpumask_copy(policy->cpus, perf->shared_cpu_map);
> }
> Instead of perf->shared_cpu_map you could use all online cpus (cpu_online_mask).
>
> Due to possible HW dependencies and to make sure they got correctly exported by
> BIOS (_PSD ACPI func) and due to the fact that latest CPUs can boost which you
> cannot control, which you even can only measure over a period of time (you don't
> know at which freq your currently are) you should use mperf (in cpufrequtils)
> or better latest cpupower monitor feature.
> They show you the frequency your cores were really in.
> Real HW frequency might behave rather different than you'd expect it.
>
> Thomas
>
> > It means that as long as one CPU frequency is higher, the rest lower
> > freq will adjust to the higher freq. even I set them to the lower
> > freq.
> > From the cpufreq-info report, it seems they are using hardware
> > coordination, not software coordination.
> > I saw some other articles talking about we can choose which coordination to use.
> > Do you know how to setting to software coordination, even if the power
> > do not save any consumption is ok.
> > I want the different speed of CPU for experiment.
> > Thanks for your listening!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-24 6:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CABgotTJO-_PppTW_1cqmsgV-0VQcK=BdQ76jXWg-M2gTxNOVgA@mail.gmail.com>
2011-10-18 2:30 ` question about scailing CPU frequency sabrina chang
2011-10-20 4:48 ` Thomas Renninger
[not found] ` <CABgotTKRyXA=SVogC0qBTu+8L3QKPsJg_KecY3CLMGMz_jXnxA@mail.gmail.com>
2011-10-24 6:18 ` Fwd: " sabrina chang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.