Skip to contentSkip to conversation

cpufreq issue with K8 performance governor

PATCH New Peter Oruba 1 participant 2 messages May 29, 2007 – Jun 4, 2007 2 messages not in the archive CPU frequency scaling framework

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Am Dienstag, 29. Mai 2007 18:06:21 schrieben Sie:

Quoted 29 lines · Peter Oruba
Quoted 13 lines

Dave,

I am contacting you regarding a frequency scaling issue that I encountered with the performance governor in combination with CPU hotplug. In cpufreq.c CPU frequency is reduced to its minimum before the CPU gets unregistered and set offline. Does that have a particular reason? Since the (k8-)governor does not monitor CPU frequency that setting also applies then to the remaining CPU as well and lets the system run on the lowest frequency although performance is chose as the policy.

---
static int cpufreq_cpu_callback(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{

[......]

Quoted 10 lines
                case CPU_DOWN_PREPARE_FROZEN:
                        if (unlikely(lock_policy_rwsem_write(cpu)))
                                BUG();

                        policy = cpufreq_cpu_data[cpu];
                        if (policy) {
                                __cpufreq_driver_target(policy, policy->min,
                                                CPUFREQ_RELATION_H);
                        }
                        __cpufreq_remove_dev(sys_dev);

This is the path taken when we call suspend.
To be honest, I doubt that reducing the speed has any benefit at all, as we're about to put the CPU to sleep anyway.

Quoted 9 lines

(btw, in future sending questions to [email protected] is a better
idea. The subsystem is sufficiently complex that at times, others can answer questions better than I can, especially with the various implementations all being subtley different).

Thanks,

Dave

Okay, removing the __cpufreq_driver_target call would solve would obviously solve that problem (which btw also exists on Core2, as I tested a couple of minutes ago). Is it planned to be changed in the near future?

Thanks,
Peter

Signature · 7 lines
AMD Saxony Limited Liability Company & Co. KG
Operating System Research Center
Wilschdorfer Landstr. 101, 01109 Dresden, Germany
Register Court Dresden: HRA 4896
General Partner authorized to represent:
AMD Saxony LLC (Wilmington, Delaware, US)
General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy

_______________________________________________
Cpufreq mailing list
[email protected]
http://lists.linux.org.uk/mailman/listinfo/cpufreq

#3 lore raw

PATCH 1/1 bugfix cpufreq in combination with performance governor

Am Dienstag, 29. Mai 2007 18:20:06 schrieb Peter Oruba:

Quoted 37 lines

Am Dienstag, 29. Mai 2007 18:06:21 schrieben Sie:

Quoted 36 lines · Peter Oruba
Quoted 13 lines

Dave,

I am contacting you regarding a frequency scaling issue that I encountered with the performance governor in combination with CPU hotplug. In cpufreq.c CPU frequency is reduced to its minimum before the CPU gets unregistered and set offline. Does that have a particular reason? Since the (k8-)governor does not monitor CPU frequency that setting also applies then to the remaining CPU as well and lets the system run on the lowest frequency although performance is chose as the policy.

---
static int cpufreq_cpu_callback(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{

[......]

Quoted 10 lines
                case CPU_DOWN_PREPARE_FROZEN:
                        if (unlikely(lock_policy_rwsem_write(cpu)))
                                BUG();

                        policy = cpufreq_cpu_data[cpu];
                        if (policy) {
                                __cpufreq_driver_target(policy, policy->min,
                                                CPUFREQ_RELATION_H);
                        }
                        __cpufreq_remove_dev(sys_dev);

This is the path taken when we call suspend.
To be honest, I doubt that reducing the speed has any benefit at all, as we're about to put the CPU to sleep anyway.

(btw, in future sending questions to [email protected] is a better
idea. The subsystem is sufficiently complex that at times, others can answer questions better than I can, especially with the various implementations all being subtley different).

Thanks,

Quoted 8 lines
Quoted 2 lines

Dave

Okay, removing the __cpufreq_driver_target call would solve would obviously solve that problem (which btw also exists on Core2, as I tested a couple of minutes ago). Is it planned to be changed in the near future?

Thanks,
Peter

My patch, aimed at that issue.

Signed-off by: Peter Oruba <[email protected]>

---

drivers/cpufreq/cpufreq.c 2007-06-04 18:43:01.000000000 +0200 renamed from drivers/cpufreq/cpufreq.c.orig 2007-06-04 18:30:57.000000000 +0200 +0 -5
@@ -1698,11 +1698,6 @@ static int cpufreq_cpu_callback(struct n
                        if (unlikely(lock_policy_rwsem_write(cpu)))
                                BUG();
 
-                       policy = cpufreq_cpu_data[cpu];
-                       if (policy) {
-                               __cpufreq_driver_target(policy, policy->min,
-                                               CPUFREQ_RELATION_H);
-                       }
                        __cpufreq_remove_dev(sys_dev);
                        break;
                case CPU_DOWN_FAILED:

---

Signature · 7 lines
AMD Saxony Limited Liability Company & Co. KG
Operating System Research Center
Wilschdorfer Landstr. 101, 01109 Dresden, Germany
Register Court Dresden: HRA 4896
General Partner authorized to represent:
AMD Saxony LLC (Wilmington, Delaware, US)
General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy