Messages in this thread | | | Date | Wed, 13 Feb 2019 13:02:51 +0100 | From | Petr Mladek <> | Subject | Re: [PATCH 2/2] kthread: Do not use TIMER_IRQSAFE |
| |
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@suse.com> > Cc: Ingo Molnar <mingo@kernel.org> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Best Regards, Petr
| |