Re: [RFC PATCH] kthread: do not modify running work

From: Thomas Gleixner
Date: Thu Oct 01 2020 - 09:59:42 EST


On Thu, Oct 01 2020 at 17:51, Hillf Danton wrote:
> On Wed, 30 Sep 2020 17:01:09 +0200 Petr Mladek wrote:
>> On Sat 2020-09-26 12:04:26, Hillf Danton wrote:
>> >
>> > It does not make much sense to rearm timer for the delayed work if
>> > it is worker's current work atm because it's good to do work only
>> > once.
>>
>> Quite typical scenario is to queue delayed work from its own callback.
>> It allows to do the work in regular intervals.
>>
>> This patch would break it. Or do I miss anything?
>
> It took more than 30 minutes to search kthread_mod_delayed_work for a
> callback at lore.kernel.org and failed, so can you point me to such an
> use case?

Why searching lore.kernel.org and not using git grep?

Aside of that it's pretty irrelevant whether there is a user at the
moment which reschedules work from the callback or not.

It's something which needs to work because its possible from regular
work queues as well and makes a lot of sense.

Thanks,

tglx