linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Huang\, Ying" <ying.huang@intel.com>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Michal Hocko <mhocko@kernel.org>,
	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>
Subject: Re: [PATCH -mm] mm, huge page: Copy to access sub-page last when copy huge page
Date: Mon, 21 May 2018 10:34:25 +0800	[thread overview]
Message-ID: <87bmd9ka8e.fsf@yhuang-dev.intel.com> (raw)
In-Reply-To: <64430ed4-4019-d597-ccb3-8bf6b04ee464@oracle.com> (Mike Kravetz's message of "Fri, 18 May 2018 09:41:04 -0700")

Mike Kravetz <mike.kravetz@oracle.com> writes:

> On 05/17/2018 11:24 PM, Michal Hocko wrote:
>> 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?
>
> One way to 'add less code' would be to create a helper routine that
> indicates the order in which sub-pages are to be copied.  IIUC, you
> added the same algorithm for sub-page ordering to copy_huge_page()
> that was previously added to clear_huge_page().  Correct?

Yes.

> If so, then perhaps a common helper could be used by both the clear
> and copy huge page routines.  It would also make maintenance easier.

That's a good idea.  But this may need to turn
copy_user_highpage()/clear_user_highpage() calling in
copy_user_huge_page()/clear_huge_page() from direct call to indirect
call.  I don't know whether this will incur some overhead.  Will try to
measure this.

Best Regards,
Huang, Ying

  reply	other threads:[~2018-05-21  2:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-18  3:03 [PATCH -mm] mm, huge page: Copy to access sub-page last when copy huge page Huang, Ying
2018-05-18  6:24 ` Michal Hocko
2018-05-18 16:41   ` Mike Kravetz
2018-05-21  2:34     ` Huang, Ying [this message]
2018-05-21  1:51   ` Huang, Ying

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=87bmd9ka8e.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;
as well as URLs for NNTP newsgroup(s).