LKML Archive on
help / color / mirror / Atom feed
From: Viresh Kumar <>
To: Peter Zijlstra <>
Cc: Thomas Gleixner <>,
	Ingo Molnar <>,
	Linaro Kernel Mailman List <>,
	Linux Kernel Mailing List <>
Subject: Re: [PATCH 1/2] hrtimer: update '->active_bases' before calling hrtimer_force_reprogram()
Date: Thu, 2 Apr 2015 19:53:59 +0530	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 2 April 2015 at 19:46, Peter Zijlstra <> wrote:
> So then I'm not seeing how its a bug. Sure __hrtimer_get_next_event()
> will iterate all the bases again, and it will not skip the just empty
> one. But I don't see how that is anything but an inefficiency. By virtue
> of the base being empty it cannot find an event there, so its a
> pointless check.
> What am I missing?

Hmm. It was a bug for me because I was doing this unconditionally:
timer = container_of(timerqueue_getnext(&base->active),
+                                    struct hrtimer, node);

And this will give a container-of over NULL, as timerqueue_getnext() can
return NULL..

And so it will crash in my case.

But I understand your point, its inefficiency only :(

  reply	other threads:[~2015-04-02 14:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02 10:51 [PATCH 0/2] hrtimer: Only iterate over active bases Viresh Kumar
2015-04-02 10:51 ` [PATCH 1/2] hrtimer: update '->active_bases' before calling hrtimer_force_reprogram() Viresh Kumar
2015-04-02 13:47   ` Peter Zijlstra
2015-04-02 13:53     ` Viresh Kumar
2015-04-02 14:16       ` Peter Zijlstra
2015-04-02 14:23         ` Viresh Kumar [this message]
2015-04-02 10:51 ` [PATCH 2/2] hrtimer: create for_each_active_base() to iterate over active clock-bases Viresh Kumar
2015-04-02 13:45   ` Peter Zijlstra
2015-04-03  5:42     ` 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \ \ \ \
    --subject='Re: [PATCH 1/2] hrtimer: update '\''->active_bases'\'' before calling hrtimer_force_reprogram()' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).