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: <ZJ9MzXol8ZZtYygD@casper.infradead.org>
Date:   Fri, 30 Jun 2023 22:44:45 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     zenghongling <zenghongling@...inos.cn>
Cc:     hch@...radead.org, darrick.wong@...cle.com,
        linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org, zhongling0719@....com
Subject: Re: [PATCH] fs: Optimize unixbench's file copy test

On Fri, Jun 30, 2023 at 05:28:23PM +0800, zenghongling wrote:
> The iomap_set_range_uptodate function checks if the file is a private
> mapping,and if it is, it needs to do something about it.UnixBench's
> file copy tests are mostly share mapping, such a check would reduce
> file copy scores, so we added the unlikely macro for optimization.
> and the score of file copy can be improved after branch optimization.
>  
> -	if (page_has_private(page))
> +	if (unlikely(page_has_private(page)))

This changelog shows a complete misunderstanding of the code you're
changing.  page_has_private() has nothing to do with whether the file
is "a private mapping", whatever that means.  The test is whether the
filesystem has added private data to the page.

As Darrick said, this code has been completely rewritten in a current
kernel.  You should test with something recent.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ