[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140225120149.GR9987@twins.programming.kicks-ass.net>
Date: Tue, 25 Feb 2014 13:01:49 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
John Stultz <john.stultz@...aro.org>,
Anton Vorontsov <anton@...msg.org>,
Alexey Perevalov <a.perevalov@...sung.com>,
kyungmin.park@...sung.com, cw00.choi@...sung.com
Subject: Re: [RFC patch 2/5] hrtimer: Make use of the active bases bitfield
On Fri, Feb 21, 2014 at 05:56:16PM -0000, Thomas Gleixner wrote:
> - for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) {
> + while (bases) {
> struct hrtimer_clock_base *base;
> struct timerqueue_node *node;
> ktime_t basenow;
> + int idx;
>
> - if (!(cpu_base->active_bases & (1 << i)))
> - continue;
> + idx = __ffs(bases);
> + bases &= ~(1 << idx);
>
> - base = cpu_base->clock_base + i;
> + base = cpu_base->clock_base + idx;
> basenow = ktime_add(now, base->offset);
>
> while ((node = timerqueue_getnext(&base->active))) {
That's crappy for archs that end up using the generic __ffs().
The simply loop we had isn't too bad, why change this?
--
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