lkml.org 
[lkml]   [2007]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: 2.6.24-rc5-git7: Reported regressions from 2.6.23
Date
Hi,

"Rafael J. Wysocki" <rjw@sisk.pl> writes:

> This message contains a list of some regressions from 2.6.23 reported since
> 2.6.24-rc1 was released, for which there are no fixes in the mainline I know
> of. If any of them have been fixed already, please let me know.
>
> If you know of any other unresolved regressions from 2.6.23, please let me know
> either and I'll add them to the list. Also, please let me know if any of the
> entries below are invalid.

I still have a bug with cpufreq when using ondemand governor as default.

The performance governor, which has been the essential default until
1c2562459faedc35927546cfa5273ec6c2884cce, was initialized with
fs_initcall() instead of module_init() to make sure the driver is up and
running when the bootcode (speedstep_init in my case) calls into it.

Since the above mentioned commit, other governors can also be chosen to
be the default but they are not correctly initialized before first use
then.

I poked Dave (added to CC) but no response since a few days. I am
getting edgy now because this really breaks stuff and the attached patch
should get into .24 or at least the problem should be taken more
seriously. I have not yet seen a discussion about this particular
problem, so if I missed something, please tell me and consider this mail
obsolete.

Hannes


From: Johannes Weiner <hannes@saeurebad.de>
Date: Tue, 18 Dec 2007 13:03:49 +0100
Subject: [PATCH] cpufreq: Initialise default governor before use

When the cpufreq driver starts up at boot time, it calls into the
default governor which might not be initialised yet. This hurts when
the governor's worker function relies on memory that is not yet set up
by its init function.

This migrates all governors from module_init() to fs_initcall() when
being the default, as was already done in cpufreq_performance when it
was the only possible choice.

Fixes at least one actual oops where ondemand is the default governor
and cpufreq_governor_dbs() uses the uninitialised kondemand_wq
work-queue during boot-time.

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
---
drivers/cpufreq/cpufreq_conservative.c | 4 ++++
drivers/cpufreq/cpufreq_ondemand.c | 5 ++++-
drivers/cpufreq/cpufreq_performance.c | 4 ++++
drivers/cpufreq/cpufreq_userspace.c | 4 ++++
4 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index 1bba997..5d3a04b 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -603,5 +603,9 @@ MODULE_DESCRIPTION ("'cpufreq_conservative' - A dynamic cpufreq governor for "
"optimised for use in a battery environment");
MODULE_LICENSE ("GPL");

+#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
+fs_initcall(cpufreq_gov_dbs_init);
+#else
module_init(cpufreq_gov_dbs_init);
+#endif
module_exit(cpufreq_gov_dbs_exit);
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index 369f445..d2af20d 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -610,6 +610,9 @@ MODULE_DESCRIPTION("'cpufreq_ondemand' - A dynamic cpufreq governor for "
"Low Latency Frequency Transition capable processors");
MODULE_LICENSE("GPL");

+#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND
+fs_initcall(cpufreq_gov_dbs_init);
+#else
module_init(cpufreq_gov_dbs_init);
+#endif
module_exit(cpufreq_gov_dbs_exit);
-
diff --git a/drivers/cpufreq/cpufreq_performance.c b/drivers/cpufreq/cpufreq_performance.c
index e8e1451..df5fca3 100644
--- a/drivers/cpufreq/cpufreq_performance.c
+++ b/drivers/cpufreq/cpufreq_performance.c
@@ -60,5 +60,9 @@ MODULE_AUTHOR("Dominik Brodowski <linux@brodo.de>");
MODULE_DESCRIPTION("CPUfreq policy governor 'performance'");
MODULE_LICENSE("GPL");

+#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE
fs_initcall(cpufreq_gov_performance_init);
+#else
+module_init(cpufreq_gov_performance_init);
+#endif
module_exit(cpufreq_gov_performance_exit);
diff --git a/drivers/cpufreq/cpufreq_userspace.c b/drivers/cpufreq/cpufreq_userspace.c
index 51bedab..f8cdde4 100644
--- a/drivers/cpufreq/cpufreq_userspace.c
+++ b/drivers/cpufreq/cpufreq_userspace.c
@@ -231,5 +231,9 @@ MODULE_AUTHOR ("Dominik Brodowski <linux@brodo.de>, Russell King <rmk@arm.linux.
MODULE_DESCRIPTION ("CPUfreq policy governor 'userspace'");
MODULE_LICENSE ("GPL");

+#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE
fs_initcall(cpufreq_gov_userspace_init);
+#else
+module_init(cpufreq_gov_userspace_init);
+#endif
module_exit(cpufreq_gov_userspace_exit);
--
1.5.3.7


\
 
 \ /
  Last update: 2007-12-21 14:57    [from the cache]
©2003-2011 Jasper Spaans