From: Hao Lee <haolee.swjtu@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: eliminate function call overhead during copy_page_range()
Date: Mon, 6 Feb 2023 09:17:59 +0000 [thread overview]
Message-ID: <20230206091759.GA16477@haolee.io> (raw)
In-Reply-To: <Y+AlcdA3fH0FiJGO@casper.infradead.org>
On Sun, Feb 05, 2023 at 09:53:53PM +0000, Matthew Wilcox wrote:
> On Sun, Feb 05, 2023 at 03:06:02PM +0000, Hao Lee wrote:
> > vm_normal_page() is called so many times that its overhead is very high.
> > After changing this call site to an inline function, copy_page_range()
> > runs 3~5 times faster than before.
>
> So you're saying that your compiler is making bad decisions? What
> architecture, what compiler, what version? Do you have
> CONFIG_ARCH_HAS_PTE_SPECIAL set?
>
> Is there something about inlining it that makes the compiler able to
> optimise away code, or is it really the function call overhead? Can
> you share any perf results?
I am so embarrassed; I forgot to disable function_graph when timing the
non-inlined function so my test was interfered. And the actual
performance improvement is only ~3%.
Please ignore this patch. Sorry...
>
prev parent reply other threads:[~2023-02-06 9:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-05 15:06 Hao Lee
2023-02-05 21:53 ` Matthew Wilcox
2023-02-06 9:17 ` Hao Lee [this message]
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=20230206091759.GA16477@haolee.io \
--to=haolee.swjtu@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=willy@infradead.org \
/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