Re: [RFC PATCH] workqueue: introduce WORK_STRUCT_TIMER_PENDING_BIT.

From: Tejun Heo
Date: Fri Jan 03 2025 - 17:18:29 EST


Hello,

On Mon, Dec 30, 2024 at 05:45:00PM +1100, Imran Khan wrote:
> Currently WORK_STRUCT_PENDING_BIT can indicate a work_struct that is
> already made it to work list of a worker_pool or a work_struct that has
> not yet made it there because it comes from a delayed_work whose timer
> has not expired yet.
>
> Use WORK_STRUCT_TIMER_PENDING_BIT to distinguish between these two
> states of work_struct.
>
> Signed-off-by: Imran Khan <imran.f.khan@xxxxxxxxxx>
> ---
> I have kept the patch as RFC, because this change is not fixing a bug.
> It makes WORK_STRUCT_PENDING_BIT less ambiguous and helps in debugging,
> by indicating where one should look for this pending work.

But can't you already tell this by looking at the work struct? I'm not sure
about adding more atomic ops for redundant information.

Thanks.

--
tejun