linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: zenghongling <zenghongling@kylinos.cn>
Cc: hch@infradead.org, darrick.wong@oracle.com,
	linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, zhongling0719@126.com
Subject: Re: [PATCH] fs: Optimize unixbench's file copy test
Date: Fri, 30 Jun 2023 22:44:45 +0100	[thread overview]
Message-ID: <ZJ9MzXol8ZZtYygD@casper.infradead.org> (raw)
In-Reply-To: <1688117303-8294-1-git-send-email-zenghongling@kylinos.cn>

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.

  parent reply	other threads:[~2023-06-30 21:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30  9:28 [PATCH] fs: Optimize unixbench's file copy test zenghongling
2023-06-30 15:19 ` Darrick J. Wong
2023-06-30 21:44 ` Matthew Wilcox [this message]
2023-07-05  4:49 ` Ritesh Harjani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZJ9MzXol8ZZtYygD@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=darrick.wong@oracle.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=zenghongling@kylinos.cn \
    --cc=zhongling0719@126.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).