lkml.org 
[lkml]   [2014]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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?


\
 
 \ /
  Last update: 2014-02-25 14:21    [W:0.070 / U:3.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site