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] [day] [month] [year] [list]
Message-ID: <tip-4aed89d6b515b9185351706ca95cd712c9d8d6a3@git.kernel.org>
Date:	Mon, 10 Jan 2011 08:39:50 GMT
From:	tip-bot for Pierre Tardy <pierre.tardy@...el.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	johnstul@...ibm.com, bunk@...sta.de, pierre.tardy@...el.com,
	arjan@...radead.org, suresh.b.siddha@...el.com,
	zippel@...ux-m68k.org, tglx@...utronix.de, ak@...e.de,
	hpa@...ux.intel.com, mingo@...e.hu
Subject: [tip:x86/urgent] x86, lapic-timer: Increase the max_delta to 31 bits

Commit-ID:  4aed89d6b515b9185351706ca95cd712c9d8d6a3
Gitweb:     http://git.kernel.org/tip/4aed89d6b515b9185351706ca95cd712c9d8d6a3
Author:     Pierre Tardy <pierre.tardy@...el.com>
AuthorDate: Thu, 6 Jan 2011 16:23:29 +0100
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Mon, 10 Jan 2011 09:36:49 +0100

x86, lapic-timer: Increase the max_delta to 31 bits

Latest atom socs(penwell) does not have hpet timer.

As their local APIC timer is clocked at 400KHZ, and the current
code limit their Initial Counter register to 23 bits, they
cannot sleep more than 1.34 seconds which leads to ~2 spurious
wakeup per second (1 per thread)

These SOCs support 32bit timer so we change the max_delta to at
least 31bits. So we can at least sleep for 300 seconds.

We could not find any previous chip errata where lapic would
only have 23 bit precision As powertop is suggesting to activate
HPET to "sleep longer", this could mean this problem is already
known.

Problem is here since very first implementation of lapic timer
as a clock event e9e2cdb [PATCH] clockevents: i386 drivers.

Signed-off-by: Suresh Siddha <suresh.b.siddha@...el.com>
Signed-off-by: Pierre Tardy <pierre.tardy@...el.com>
Acked-by: Thomas Gleixner <tglx@...utronix.de>
Cc: Arjan van de Ven <arjan@...radead.org>
Cc: Adrian Bunk <bunk@...sta.de>
Cc: H. Peter Anvin <hpa@...ux.intel.com>
Cc: john stultz <johnstul@...ibm.com>
Cc: Roman Zippel <zippel@...ux-m68k.org>
Cc: Andi Kleen <ak@...e.de>
LKML-Reference: <1294327409-19426-1-git-send-email-pierre.tardy@...el.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 arch/x86/kernel/apic/apic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index ce65d44..1efd378 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -684,7 +684,7 @@ static int __init calibrate_APIC_clock(void)
 	lapic_clockevent.mult = div_sc(delta, TICK_NSEC * LAPIC_CAL_LOOPS,
 				       lapic_clockevent.shift);
 	lapic_clockevent.max_delta_ns =
-		clockevent_delta2ns(0x7FFFFF, &lapic_clockevent);
+		clockevent_delta2ns(0x7FFFFFFF, &lapic_clockevent);
 	lapic_clockevent.min_delta_ns =
 		clockevent_delta2ns(0xF, &lapic_clockevent);
 
--
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