[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150402134713.GB23123@twins.programming.kicks-ass.net>
Date: Thu, 2 Apr 2015 15:47:13 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, linaro-kernel@...ts.linaro.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] hrtimer: update '->active_bases' before calling
hrtimer_force_reprogram()
On Thu, Apr 02, 2015 at 04:21:21PM +0530, Viresh Kumar wrote:
> 'active_bases' indicates which clock-base have active timers. While it
> is updated (almost) correctly, it is hardly used. Next commit will start
> using it to make code more efficient, but before that we need to fix a
> problem.
>
> While removing hrtimers, in __remove_hrtimer():
> - We first remove the hrtimer from the queue.
> - Then reprogram clockevent device if required
> (hrtimer_force_reprogram()).
> - And then finally clear 'active_bases', if no more timers are pending
> on the current clock base (from which we are removing the hrtimer).
>
> hrtimer_force_reprogram() needs to loop over all active clock bases to
> find the next expiry event, and while doing so it will use
> 'active_bases' (after next commit). And it will find the current base
> active, as we haven't cleared it until now, even if current clock base
> has no more hrtimers queued.
>
> To fix this issue, clear active_bases before calling
> hrtimer_force_reprogram().
This is a small inefficiency right? Not an actual bug or anything.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists