linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ashwin Chaugule <ashwinc@codeaurora.org>
To: linux-kernel@vger.kernel.org, mingo@redhat.com, tglx@linutronix.de
Subject: [RFC] [PATCH 0/1] hrtimers: Remove unnecessary clock events device programming
Date: Thu, 27 Aug 2009 17:48:52 -0400	[thread overview]
Message-ID: <4A96FF44.8060208@codeaurora.org> (raw)


hrtimer_force_reprogram() was being called quite often unnecessarily. 
The following patch caches the hrtimer that causes the 
cpu_base->expires_next value to change. This way, we force the reprogram 
only when remove_hrtimer() finds that its going to remove an hrtimer 
which was about expire next. IOW, we forgo reprogramming the clock 
events device, if the current timer to be removed isn't at the root of 
the expires tree.

Also removed the hrtimer_is_queued check from remove_hrtimer and made 
appropriate changes to all callers. That check seemed redundant.


Results:

Shows ~60% reduction in the following calls to program clock events device.
-  tick_nohz_restart_sched_tick (tick_sched_timer)
-  hrtimer_start (tick_sched_timer)

I haven't traced all the callers yet, this was from a hack to 
timer_stats. If you guys have a better way to test this, I'll give that 
a go.

Tested on v2.6.29 on an ARM based embedded device.

Cheers,
Ashwin

                 reply	other threads:[~2009-08-27 21:48 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=4A96FF44.8060208@codeaurora.org \
    --to=ashwinc@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.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;
as well as URLs for NNTP newsgroup(s).