[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZB0Dwxs6xen7D/qh@slm.duckdns.org>
Date: Thu, 23 Mar 2023 15:58:27 -1000
From: Tejun Heo <tj@...nel.org>
To: Yue Hu <zbestahu@...il.com>
Cc: jiangshanlai@...il.com, linux-kernel@...r.kernel.org,
huyue2@...lpad.com, zhangwen@...lpad.com
Subject: Re: [PATCH] workqueue: Drop the NOT_RUNNING check to flags in
worker_{set,clr}_flags
On Mon, Mar 20, 2023 at 05:26:52PM +0800, Yue Hu wrote:
> From: Yue Hu <huyue2@...lpad.com>
>
> We know whether the worker flags are belong to WORKER_NOT_RUNNING or not
> when we are setting and clearing them. So check the flags not running
> related is unnecessary for both the cases.
>
> Currently, worker_{set,clr}_flags() are all used for WORKER_NOT_RUNNING
> except for clearing WORKER_IDLE. Let's change to directly clear it
> instead. Also, update the comment a little in worker_clr_flags().
I'm not sure this is better. Semantically, the existing code seems clearer
and less error-prone to me and this isn't gonna make any meaningful perf
difference. Lai, what do you think?
Thanks.
--
tejun
Powered by blists - more mailing lists