Re: [PATCH 2/2] kthread: Do not use TIMER_IRQSAFE

From: Petr Mladek
Date: Wed Feb 13 2019 - 07:02:54 EST


On Tue 2019-02-12 17:25:54, Sebastian Andrzej Siewior wrote:
> The TIMER_IRQSAFE was introduced in commit
>
> 22597dc3d97b1 ("kthread: initial support for delayed kthread work")
>
> which modelled the delayed kthread code after workqueue's code. The
> workqueue code requires the flag TIMER_IRQSAFE for synchronisation
> purpose. This is not true for kthread's delay timer since all
> operations occur under a lock.

Great catch! The original proposal used a lockless code. We missed
that the irq safe timer was not longer needed with the spin lock.

> Remove TIMER_IRQSAFE from the timer initialisation.
> Use timer_setup() for initialisation purpose which is the official
> function.
>
> Cc: Petr Mladek <pmladek@xxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr