[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1506081005210.4133@nanos>
Date: Mon, 8 Jun 2015 10:06:07 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Oleg Nesterov <oleg@...hat.com>
cc: Peter Zijlstra <peterz@...radead.org>, umgwanakikbuti@...il.com,
mingo@...e.hu, ktkhai@...allels.com, rostedt@...dmis.org,
juri.lelli@...il.com, pang.xunlei@...aro.org,
wanpeng.li@...ux.intel.com, linux-kernel@...r.kernel.org
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists