lkml.org 
[lkml]   [2006]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 12/13] hrtimer: optimize hrtimer_get_remaining

* Roman Zippel <zippel@linux-m68k.org> 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-13 15:17    [W:0.047 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site