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] [day] [month] [year] [list]
Message-ID: <CY8PR05MB9378C5CE9BDB61987D6D68D4CDF0A@CY8PR05MB9378.namprd05.prod.outlook.com>
Date:   Wed, 13 Sep 2023 09:33:32 +0800
From:   Wang Jianchao <jianchwa@...look.com>
To:     Dave Chinner <david@...morbit.com>
Cc:     djwong@...nel.org, linux-xfs@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] xfs: use roundup_pow_of_two instead of ffs during
 xlog_find_tail



On 2023/9/13 06:44, Dave Chinner wrote:
> On Tue, Sep 12, 2023 at 03:20:56PM +0800, Wang Jianchao wrote:
>>
>> In our production environment, we find that mounting a 500M /boot
>> which is umount cleanly needs ~6s. One cause is that ffs() is
>> used by xlog_write_log_records() to decide the buffer size. It
>> can cause a lot of small IO easily when xlog_clear_stale_blocks()
>> needs to wrap around the end of log area and log head block is
>> not power of two. Things are similar in xlog_find_verify_cycle().
>>
>> The code is able to handed bigger buffer very well, we can use
>> roundup_pow_of_two() to replace ffs() directly to avoid small
>> and sychronous IOs.
>>
>> Changes in V1:
>>  - Also replace the ffs in xlog_find_verify_cycle()
> 
> Change logs go either below the --- line or in the cover letter,
> not the commit itself.

OK

> 
> Other than that, the change looks ok. The use of ffs() was added in
> 2002 simply to make buffers a power-of-2 size. I don't think it had
> anything to do with trying to maximise the actual buffer size at
> all, otherwise it would have made to use fls() like
> roundup_pow_of_two() does...
> 
> Reviewed-by: Dave Chinner <dchinner@...hat.com>
> 

Thanks
Jianchao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ