Re: [PATCH 12/13] hrtimer: optimize hrtimer_get_remaining

From: Ingo Molnar
Date: Mon Feb 13 2006 - 09:12:29 EST



* Roman Zippel <zippel@xxxxxxxxxxxxxx> wrote:

> hrtimer_get_remaining doesn't need to lock the hrtimer_base to read
> the time. Also use hrtimer_get_remaining at two other places.

nack - it's not only about ->get_time() atomicity:

> - base = lock_hrtimer_base(timer, &flags);
> - rem = ktime_sub(timer->expires, timer->base->get_time());
> - unlock_hrtimer_base(timer, &flags);

timer->expires is a 64-bit value, which might be read nonatomically on
32-bit platforms. Wherever it's safe, we already open-code this
ktime_sub() - if you find more places then please do it that way.

definitely not something for v2.6.16.

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/