Messages in this thread Patch in this message | | | From | Thomas Renninger <> | Subject | [PATCH] Re: AMD Mobile Semprons (3500+, 3600+,...) break with nohz and highres enabled | Date | Wed, 16 Jul 2008 18:27:15 +0200 |
| |
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@geins-web.de Signed-off-by: Thomas Renninger <trenn@suse.de> --- 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
| |