Messages in this thread | | | Date | Tue, 25 Feb 2014 13:01:49 +0100 | From | Peter Zijlstra <> | 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?
| |