public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Antipov <dmitry.antipov@linaro.org>
To: john stultz <johnstul@us.ibm.com>
Cc: linaro-dev@lists.linaro.org, linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Amit Kucheria <amit.kucheria@linaro.org>
Subject: Re: [PATCH] hrtimers, timers: eliminate some jiffies-backed code
Date: Wed, 25 Jan 2012 13:46:18 +0400	[thread overview]
Message-ID: <4F1FCF6A.20108@linaro.org> (raw)
In-Reply-To: <1327449689.11738.34.camel@work-vm>

On 01/25/2012 04:01 AM, john stultz wrote:

> Why do you want to move loops like the above from jiffies based timeouts
> to hrtimers?

I'm trying to see whether there are possible benefits in the sense of power management.
More hrtimers with larger expire deltas -> more opportunities to coalesce hrtimer
interrupts -> less frequency of hrtimer interrupts -> longer idle/suspend/stanby/etc.
periods.

> Is there an actual need for sub-jiffy granularity in these sorts of
> timeouts?

I didn't collect a representative statistics among the large set of different drivers,
but I believe the answer is 'no' for the most of them. The main reason is described above.

> Or is this really just a "getting away from using jiffies" cleanup?

A bit of this too, definitely. Documentation/timers/highres.txt notices 'complete jiffies
removal' as something which may take place sometime; at least, I don't have an ideas why
to use jiffies in a new code.

> Calling get_time() again on each hrtimer_wakeup isn't free.
>
> With this we end up when the irq fires, calling hrtimer_interrupt, which
> reads the time and goes through the timer list running expired timers,
> which then runs the sleeper's timer which then reads the time again!
> Additinoally, this extra overhead is done even no one wants the elapsed
> time.

Thanks, I'll think about reworking of this.

Dmitry

      reply	other threads:[~2012-01-25  9:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-23 15:40 [PATCH] hrtimers, timers: eliminate some jiffies-backed code Dmitry Antipov
2012-01-23 16:57 ` Amit Kucheria
2012-01-25  0:01 ` john stultz
2012-01-25  9:46   ` Dmitry Antipov [this message]

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=4F1FCF6A.20108@linaro.org \
    --to=dmitry.antipov@linaro.org \
    --cc=amit.kucheria@linaro.org \
    --cc=johnstul@us.ibm.com \
    --cc=linaro-dev@lists.linaro.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