[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20061209113632.GA31648@elte.hu>
Date: Sat, 9 Dec 2006 12:36:32 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Andrew Morton <akpm@...l.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org
Subject: [patch] high-res timers: next_event calculation fix
Subject: [patch] high-res timers: next_event calculation fix
From: Ingo Molnar <mingo@...e.hu>
do not set expires_next to KTIME_MAX if a too short timeout
is being set - this can result in the clock events device
being shut down completely.
found via a stresstest on a C3-lapic-plagued laptop that did
very short sleeps.
This bug could explain the 'Synaptics hang' that was reported.
Signed-off-by: Ingo Molnar <mingo@...e.hu>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
kernel/time/clockevents.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Index: linux/kernel/time/clockevents.c
===================================================================
--- linux.orig/kernel/time/clockevents.c
+++ linux/kernel/time/clockevents.c
@@ -510,10 +510,8 @@ int clockevents_set_next_event(ktime_t e
struct clock_event_device *nextevt = devices->nextevt;
int64_t delta = ktime_to_ns(ktime_sub(expires, ktime_get()));
- if (delta <= 0 && !force) {
- devices->expires_next.tv64 = KTIME_MAX;
+ if (delta <= 0 && !force)
return -ETIME;
- }
devices->expires_next = expires;
-
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