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: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Andrea Arcangeli <aarcange@redhat.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Andi Kleen <andi.kleen@intel.com>, Jan Kara <jack@suse.cz>,
	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>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	Punit Agrawal <punit.agrawal@arm.com>,
	Anshuman Khandual <khandual@linux.vnet.ibm.com>,
	David Rientjes <rientjes@google.com>,
	Michal Hocko <mhocko@suse.com>
Subject: Re: [PATCH -V2 -mm] mm, hugetlbfs: Pass fault address to no page handler
Date: Fri, 18 May 2018 08:33:50 +0800	[thread overview]
Message-ID: <87wow1x0nl.fsf@yhuang-dev.intel.com> (raw)
In-Reply-To: <2eba3615-5144-f08d-169a-6cfd417d00b9@oracle.com> (Mike Kravetz's message of "Thu, 17 May 2018 10:56:45 -0700")

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

> On 05/17/2018 01:35 AM, Huang, Ying wrote:
>> From: Huang Ying <ying.huang@intel.com>
>> 
>> This is to take better advantage of general huge page clearing
>> optimization (c79b57e462b5d, "mm: hugetlb: clear target sub-page last
>> when clearing huge page") for hugetlbfs.  In the general optimization
>> patch, the sub-page to access will be cleared last to avoid the cache
>> lines of to access sub-page to be evicted when clearing other
>> sub-pages.  This works better if we have the address of the sub-page
>> to access, that is, the fault address inside the huge page.  So the
>> hugetlbfs no page fault handler is changed to pass that information.
>> This will benefit workloads which don't access the begin of the
>> hugetlbfs huge page after the page fault under heavy cache contention
>> for shared last level cache.
>> 
>> 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
>> hugetlbfs.
>> 
>> With this patch, the throughput increases ~28.1% in vm-scalability
>> anon-w-seq test case with 88 processes on a 2 socket Xeon E5 2699 v4
>> system (44 cores, 88 threads).  The test case creates 88 processes,
>> each process mmaps a big anonymous memory area with MAP_HUGETLB and
>> writes to it from the end to the begin.  For each process, other
>> processes could be seen as other workload which generates heavy cache
>> pressure.  At the same time, the cache miss rate reduced from ~36.3%
>> to ~25.6%, the IPC (instruction per cycle) increased from 0.3 to 0.37,
>> and the time spent in user space is reduced ~19.3%.
>> 
>
> Agree with Michal that commit message looks better.
>
> I went through updated patch with haddr naming so,
> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
> still applies.

Thanks!

Best Regards,
Huang, Ying

      reply	other threads:[~2018-05-18  0:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17  8:35 [PATCH -V2 -mm] mm, hugetlbfs: Pass fault address to no page handler Huang, Ying
2018-05-17  9:15 ` Michal Hocko
2018-05-18  0:33   ` Huang, Ying
2018-05-17 17:56 ` Mike Kravetz
2018-05-18  0:33   ` 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=87wow1x0nl.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=aneesh.kumar@linux.vnet.ibm.com \
    --cc=cl@linux.com \
    --cc=hughd@google.com \
    --cc=jack@suse.cz \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mawilcox@microsoft.com \
    --cc=mhocko@suse.com \
    --cc=mike.kravetz@oracle.com \
    --cc=minchan@kernel.org \
    --cc=punit.agrawal@arm.com \
    --cc=rientjes@google.com \
    --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).