From: "Huang\, Ying" <ying.huang@intel.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andi Kleen <andi.kleen@intel.com>, Jan Kara <jack@suse.cz>,
Andrea Arcangeli <aarcange@redhat.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Matthew Wilcox <mawilcox@microsoft.com>,
Hugh Dickins <hughd@google.com>, Minchan Kim <minchan@kernel.org>,
Shaohua Li <shli@fb.com>, Christopher Lameter <cl@linux.com>,
Mike Kravetz <mike.kravetz@oracle.com>
Subject: Re: [PATCH -mm] mm, huge page: Copy to access sub-page last when copy huge page
Date: Mon, 21 May 2018 09:51:50 +0800 [thread overview]
Message-ID: <87fu2lkc7d.fsf@yhuang-dev.intel.com> (raw)
In-Reply-To: <20180518062430.GB21711@dhcp22.suse.cz> (Michal Hocko's message of "Fri, 18 May 2018 08:24:30 +0200")
Hi, Michal,
Michal Hocko <mhocko@kernel.org> writes:
> On Fri 18-05-18 11:03:16, Huang, Ying wrote:
> [...]
>> The patch is a generic optimization which should benefit quite some
>> workloads, not for a specific use case. To demonstrate the performance
>> benefit of the patch, we tested it with vm-scalability run on
>> transparent huge page.
>
> It is also adds quite some non-intuitive code. So is this worth? Does
> any _real_ workload benefits from the change?
I don't have any _real_ workload which benefits from this. But I think
this is the right way to copy the huge page. It should benefit many
workloads with heavy cache contention, as illustrated in the
micro-benchmark. But the performance benefit may be small or
non-measurable for the _real_ workload.
The code does become not as intuitive as before. But fortunately, all
non-intuitive code are in copy_user_huge_page(), which is a leaf
function with well defined interface and semantics. And with the help
of the code comments, at least the intention of the code is clear.
Best Regards,
Huang, Ying
>> include/linux/mm.h | 3 ++-
>> mm/huge_memory.c | 3 ++-
>> mm/memory.c | 43 +++++++++++++++++++++++++++++++++++++++----
>> 3 files changed, 43 insertions(+), 6 deletions(-)
prev parent reply other threads:[~2018-05-21 1:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-18 3:03 Huang, Ying
2018-05-18 6:24 ` Michal Hocko
2018-05-18 16:41 ` Mike Kravetz
2018-05-21 2:34 ` Huang, Ying
2018-05-21 1:51 ` Huang, Ying [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=87fu2lkc7d.fsf@yhuang-dev.intel.com \
--to=ying.huang@intel.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=andi.kleen@intel.com \
--cc=cl@linux.com \
--cc=hughd@google.com \
--cc=jack@suse.cz \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mawilcox@microsoft.com \
--cc=mhocko@kernel.org \
--cc=mike.kravetz@oracle.com \
--cc=minchan@kernel.org \
--cc=shli@fb.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