lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ