public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: md@google.com (Michael Davidson)
To: mbligh@google.com, tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] clockevents: avoid unnecessary reprograming of event timer
Date: Thu, 12 Feb 2009 14:23:25 -0800 (PST)	[thread overview]
Message-ID: <20090212222326.394E121B187@localhost> (raw)

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)

             reply	other threads:[~2009-02-12 22:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-12 22:23 Michael Davidson [this message]
2009-02-13  8:22 ` [PATCH] clockevents: avoid unnecessary reprograming of event timer Ingo Molnar
2009-02-13  9:39   ` Thomas Gleixner
2009-02-13  9:55     ` Ingo Molnar
2009-02-13 18:50   ` Michael Davidson

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=20090212222326.394E121B187@localhost \
    --to=md@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@google.com \
    --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