lkml.org 
[lkml]   [2015]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/14] hrtimer: Allow hrtimer::function() to free the timer
On Mon, 8 Jun 2015, Oleg Nesterov wrote:

> On 06/08, Oleg Nesterov wrote:
> >
> > And I simply can not understand the complication in hrtimer_active(),
> > please help!
>
> Sorry for another off-topic email, but I don't even understand the
> usage of hrtimer_active().
>
> Say, do_nanosleep()
>
> hrtimer_start_expires(&t->timer, mode);
> if (!hrtimer_active(&t->timer))
> t->task = NULL;

That's gone in tip/timers/core.

> OTOH. perf_cpu_hrtimer_restart() does
>
> if (hrtimer_active(hr))
> return;
>
> if (!hrtimer_callback_running(hr))
> __hrtimer_start_range_ns(...);
>
> why it can't simply do
>
> if (!hrtimer_active(hr)) // implies !hrtimer_callback_running()
> __hrtimer_start_range_ns(...);

That's fixed as well.

Thanks,

tglx


\
 
 \ /
  Last update: 2015-06-08 10:21    [W:0.203 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site