public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clockevents: avoid unnecessary reprograming of event timer
@ 2009-02-12 22:23 Michael Davidson
  2009-02-13  8:22 ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Davidson @ 2009-02-12 22:23 UTC (permalink / raw)
  To: mbligh, tglx; +Cc: linux-kernel

From: Michael Davidson <md@google.com>

Don't reprogram the event timer if it is already set to expire
at the correct time.

Signed-off-by: Michael Davidson <md@google.com>
---
--- linux-2.6.29-rc4.orig/kernel/time/clockevents.c	2009-02-12 13:13:24.000000000 -0800
+++ linux-2.6.29-rc4/kernel/time/clockevents.c	2009-02-12 13:25:42.525558000 -0800
@@ -103,6 +103,9 @@
 	if (delta <= 0)
 		return -ETIME;
 
+	if (ktime_equal(dev->next_event, expires))
+		return 0;
+
 	dev->next_event = expires;
 
 	if (dev->mode == CLOCK_EVT_MODE_SHUTDOWN)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-02-13 18:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-12 22:23 [PATCH] clockevents: avoid unnecessary reprograming of event timer Michael Davidson
2009-02-13  8:22 ` Ingo Molnar
2009-02-13  9:39   ` Thomas Gleixner
2009-02-13  9:55     ` Ingo Molnar
2009-02-13 18:50   ` Michael Davidson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox