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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y02qD1dWzU5ZSDEj@slm.duckdns.org>
Date:   Mon, 17 Oct 2022 09:16:31 -1000
From:   Tejun Heo <tj@...nel.org>
To:     Kemeng Shi <shikemeng@...wei.com>
Cc:     axboe@...nel.dk, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/8] blk-iocost: Remove redundant initialization of
 struct ioc_gq

On Mon, Oct 17, 2022 at 10:00:10AM +0800, Kemeng Shi wrote:
> Some member of struct ioc_gq will not be accessed before it's
> first activation and will be initialized again in it's first
> activation after ioc_pd_init. To be more specific:
> 1)Member iocg->vtime and iocg->done_vtime will set to target in
> activation which only expects vtime is equal to done_vtime in
> first activation.
> 2)Member iocg->active_period will be set with ioc->cur_period
> again in first activation.
> 
> Remove the redundant initialization to improve ioc_pd_init a
> littile bit.
> 
> The parameter now of weight_updated will not be used if iocg is
> not active, so pass NULL to weight_update here is safe and we
> can remove call to ioc_now.

This isn't a meaningful optimization and makes the code fragile for no
practical gain. Let's not do this.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ