diff options
author | Darrick J. Wong <djwong@us.ibm.com> | 2008-04-19 00:31:12 +0400 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2008-04-29 00:27:08 +0400 |
commit | e8628dd06d66f2e3965ec9742029b401d63434f1 (patch) | |
tree | 341d5a2e36c877bd52c5567aa5791557a6920557 /include/linux/cpufreq.h | |
parent | e56a727b023d40d1adf660168883f30f2e6abe0a (diff) | |
download | linux-e8628dd06d66f2e3965ec9742029b401d63434f1.tar.xz |
[CPUFREQ] expose cpufreq coordination requirements regardless of coordination mechanism
Currently, affected_cpus shows which CPUs need to have their frequency
coordinated in software. When hardware coordination is in use, the contents
of this file appear the same as when no coordination is required. This can
lead to some confusion among user-space programs, for example, that do not
know that extra coordination is required to force a CPU core to a particular
speed to control power consumption.
To fix this, create a "related_cpus" attribute that always displays the
coordination map regardless of whatever coordination strategy the cpufreq
driver uses (sw or hw). If the cpufreq driver does not provide a value, fall
back to policy->cpus.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'include/linux/cpufreq.h')
-rw-r--r-- | include/linux/cpufreq.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index ddd8652fc3f3..a881fd62c447 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -83,7 +83,8 @@ struct cpufreq_real_policy { }; struct cpufreq_policy { - cpumask_t cpus; /* affected CPUs */ + cpumask_t cpus; /* CPUs requiring sw coordination */ + cpumask_t related_cpus; /* CPUs with any coordination */ unsigned int shared_type; /* ANY or ALL affected CPUs should set cpufreq */ unsigned int cpu; /* cpu nr of registered CPU */ |