All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>,
	"linux-kernel" <linux-kernel@vger.kernel.org>,
	"andreas.herrmann3" <andreas.herrmann3@amd.com>,
	Richard <tuxbox.guru@gmail.com>,
	eumaster@gmail.com, uli.geins@geins-web.de
Subject: [PATCH] Re: AMD Mobile Semprons (3500+, 3600+,...) break with nohz and highres enabled
Date: Wed, 16 Jul 2008 18:27:15 +0200	[thread overview]
Message-ID: <200807161827.16898.trenn@suse.de> (raw)
In-Reply-To: <1213638474.1684.21.camel@queen.suse.de>

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


  parent reply	other threads:[~2008-07-16 16:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-16 17:47 AMD Mobile Semprons (3500+, 3600+,...) break with nohz and highres enabled Thomas Renninger
2008-06-16 17:54 ` H. Peter Anvin
2008-06-16 20:06   ` Richard
2008-07-16 16:27 ` Thomas Renninger [this message]
2008-07-16 19:03   ` [PATCH] " Thomas Gleixner
2008-07-16 19:56     ` Thomas Renninger
2008-07-17  6:55       ` Richard
2008-07-17 10:51         ` Thomas Gleixner
2008-07-17 11:58           ` Richard
2008-07-17 11:11             ` Thomas Gleixner
2008-07-17 12:23               ` Richard
2008-07-17 12:03                 ` Thomas Gleixner
2008-07-17 17:47                   ` Richard
2008-07-17 16:59                     ` Thomas Gleixner
2008-07-18 11:03                       ` Richard
2008-07-18 17:12                       ` Richard
2008-07-18 17:14                       ` Richard
2008-07-18 17:15                       ` Richard
2008-07-17 10:32     ` Thomas Renninger
2008-07-17 11:44       ` Richard
2008-07-17 11:05         ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200807161827.16898.trenn@suse.de \
    --to=trenn@suse.de \
    --cc=andreas.herrmann3@amd.com \
    --cc=eumaster@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=tuxbox.guru@gmail.com \
    --cc=uli.geins@geins-web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.