lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Jul 2008 18:27:15 +0200
From:	Thomas Renninger <trenn@...e.de>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	Ingo Molnar <mingo@...e.hu>,
	"linux-kernel" <linux-kernel@...r.kernel.org>,
	"andreas.herrmann3" <andreas.herrmann3@....com>,
	Richard <tuxbox.guru@...il.com>, eumaster@...il.com,
	uli.geins@...ns-web.de
Subject: [PATCH] Re: AMD Mobile Semprons (3500+, 3600+,...) break with nohz and highres enabled

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@...ns-web.de
Signed-off-by: Thomas Renninger <trenn@...e.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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ