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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Roman Zippel <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux