From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@osdl.org>
Cc: Thomas Gleixner <tglx@linutronix.de>, linux-kernel@vger.kernel.org
Subject: [patch] high-res timers: next_event calculation fix
Date: Sat, 9 Dec 2006 12:36:32 +0100 [thread overview]
Message-ID: <20061209113632.GA31648@elte.hu> (raw)
Subject: [patch] high-res timers: next_event calculation fix
From: Ingo Molnar <mingo@elte.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@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.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;
reply other threads:[~2006-12-09 11:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20061209113632.GA31648@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®