From: Ingo Molnar <mingo@elte.hu>
To: Michael Davidson <md@google.com>
Cc: mbligh@google.com, tglx@linutronix.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clockevents: avoid unnecessary reprograming of event timer
Date: Fri, 13 Feb 2009 09:22:23 +0100 [thread overview]
Message-ID: <20090213082223.GA4606@elte.hu> (raw)
In-Reply-To: <20090212222326.394E121B187@localhost>
* Michael Davidson <md@google.com> wrote:
> 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;
> +
Hm, given that a good high-res source has nanoseconds resolution,
what's the chance of this optimization triggering in practice?
Near zero i think - unless we trigger useless reprogramming without
having added or removed any new timers - but then we should
concentrate on analyzing the reason for that redundant reprogramming.
Does it trigger often for you?
Ingo
next prev parent reply other threads:[~2009-02-13 8:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-12 22:23 [PATCH] clockevents: avoid unnecessary reprograming of event timer Michael Davidson
2009-02-13 8:22 ` Ingo Molnar [this message]
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=20090213082223.GA4606@elte.hu \
--to=mingo@elte.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@google.com \
--cc=md@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