Re: [patch 03/44] posix-timer: Use a callback for cancel synchronization

2019-08-20 Thread Frederic Weisbecker
On Mon, Aug 19, 2019 at 04:31:44PM +0200, Thomas Gleixner wrote: > -static struct k_itimer *timer_wait_running(struct k_itimer *timer, > -unsigned long *flags) > -{ > - timer_t timer_id = READ_ONCE(timer->it_id); > + if

Re: [patch 03/44] posix-timer: Use a callback for cancel synchronization

2019-08-20 Thread Thomas Gleixner
On Mon, 19 Aug 2019, Christoph Hellwig wrote: > > + if (!WARN_ON_ONCE(kc->timer_wait_running)) > > + kc->timer_wait_running(timer); > > This looks weird. The only place calling yor new method only does so > after checking that it is not set and actually warns if it set? Yeah, that

Re: [patch 03/44] posix-timer: Use a callback for cancel synchronization

2019-08-19 Thread Christoph Hellwig
> + if (!WARN_ON_ONCE(kc->timer_wait_running)) > + kc->timer_wait_running(timer); This looks weird. The only place calling yor new method only does so after checking that it is not set and actually warns if it set?

[patch 03/44] posix-timer: Use a callback for cancel synchronization

2019-08-19 Thread Thomas Gleixner
Cleanup timer_wait_running() by using a kclock callback. Get's rid of the ifdeffery and the odd conditionals. Should have thought about this right away. Signed-off-by: Thomas Gleixner --- kernel/time/alarmtimer.c | 14 ++ kernel/time/posix-timers.c | 32