linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Thomas Gleixner" <tglx@linutronix.de>,
	"Frédéric Weisbecker" <fweisbec@gmail.com>
Cc: Lists linaro-kernel <linaro-kernel@lists.linaro.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linaro Networking <linaro-networking@linaro.org>
Subject: [Query]: hrtimers: why don't we consider hrtimers in get_next_timer_interrupt()
Date: Wed, 23 Apr 2014 15:08:25 +0530	[thread overview]
Message-ID: <CAKohpokPSVTJ5rupW8vM0btgtc9S6bWdgCdDkn6qHK5SfcGX0A@mail.gmail.com> (raw)

Hi,

File: hrtimer.c
Function: hrtimer_get_next_event()

I was looking closely at what's waking up my system and
found this piece of code:

ktime_t hrtimer_get_next_event(void)
{
        if (!hrtimer_hres_active()) {
                find next hrtimer event ....
        }
}

Which probably means that: "don't consider hrtimers for getting
next timer event if we are running ticks in high resolution mode".

And I couldn't understand why is it so?

When hres_active isn't set, we run hrtimer handlers from timer
handlers, which means that timers would be sufficient in finding
the next event and we don't need to check for hrtimers.

But when hres_active is set, hrtimers could be set to fire before
the next timer event and so we must take them into account.

I am new to this whole world of core frameworks and might be
missing something very very obvious. But its always better to
ask than to ignore and think that things are probably fine and
just shut up.

Thanks for your patience during my learning curve :)

--
viresh

             reply	other threads:[~2014-04-23  9:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-23  9:38 Viresh Kumar [this message]
2014-04-23 12:24 ` [Query]: hrtimers: why don't we consider hrtimers in get_next_timer_interrupt() Preeti Murthy
2014-04-24  4:43   ` Viresh Kumar

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=CAKohpokPSVTJ5rupW8vM0btgtc9S6bWdgCdDkn6qHK5SfcGX0A@mail.gmail.com \
    --to=viresh.kumar@linaro.org \
    --cc=fweisbec@gmail.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linaro-networking@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;
as well as URLs for NNTP newsgroup(s).