[PATCH] Re: AMD Mobile Semprons (3500+, 3600+,...) break with nohz and highres enabled

From: Thomas Renninger
Date: Wed Jul 16 2008 - 12:27:30 EST


This is against Andi's (ak) release branch,
hope that is ok...
Can this one be reviewed/added, pls.

Thanks,

Thomas


NO_HZ: Blacklist AMD Mobile Semprons 3500/3600 to not use no_hz by default

Tested-by: uli.geins@xxxxxxxxxxxx
Signed-off-by: Thomas Renninger <trenn@xxxxxxx>
---
kernel/time/tick-sched.c | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index b854a89..bda0164 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -589,6 +589,32 @@ static enum hrtimer_restart tick_sched_timer(struct
hrtimer *timer)
return HRTIMER_RESTART;
}

+#if defined(CONFIG_X86) && defined(CONFIG_NO_HZ)
+static __init int is_nohz_broken(void)
+{
+ struct cpuinfo_x86 *c = &cpu_data(0);
+ /* AMD Sempron Mobile 3500+ and 3600+ are known to break
+ * with tickless idle
+ */
+ if (c->x86_vendor == X86_VENDOR_AMD &&
+ c->x86 == 15) {
+ if (strstr(c->x86_model_id, "Sempron") &&
+ strstr(c->x86_model_id, "Mobile") &&
+ (strstr(c->x86_model_id, "3500") ||
+ strstr(c->x86_model_id, "3600"))) {
+ printk(KERN_INFO "AMD Sempron Mobile found");
+ return 1;
+ }
+ }
+ return 0;
+}
+#else
+static __init int is_nohz_broken(void)
+{
+ return 0;
+}
+#endif
+
/**
* tick_setup_sched_timer - setup the tick emulation timer
*/
@@ -623,6 +649,11 @@ void tick_setup_sched_timer(void)
}

#ifdef CONFIG_NO_HZ
+ if (is_nohz_broken()) {
+ printk("- disabling tickless idle\n");
+ tick_nohz_enabled = 0;
+ }
+
if (tick_nohz_enabled)
ts->nohz_mode = NOHZ_MODE_HIGHRES;
#endif
--
1.5.4.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/