linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Henry Willard <henry.willard@oracle.com>
To: akpm@linux-foundation.org
Cc: mgorman@suse.de, kstewart@linuxfoundation.org,
	zi.yan@cs.rutgers.edu, pombredanne@nexb.com, aarcange@redhat.com,
	gregkh@linuxfoundation.org, aneesh.kumar@linux.vnet.ibm.com,
	kirill.shutemov@linux.intel.com, jglisse@redhat.com,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mm: numa: Do not trap faults on shared data section pages.
Date: Tue, 16 Jan 2018 11:28:44 -0800	[thread overview]
Message-ID: <1516130924-3545-2-git-send-email-henry.willard@oracle.com> (raw)
In-Reply-To: <1516130924-3545-1-git-send-email-henry.willard@oracle.com>

Workloads consisting of a large number processes running the same program
with a large shared data section may suffer from excessive numa balancing
page migration of the pages in the shared data section. This shows up as
high I/O wait time and degraded performance on machines with higher socket
or node counts.

This patch skips shared copy-on-write pages in change_pte_range() for the
numa balancing case.

Signed-off-by: Henry Willard <henry.willard@oracle.com>
Reviewed-by: HAJPYkon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Steve Sistare steven.sistare@oracle.com
---
 mm/mprotect.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/mm/mprotect.c b/mm/mprotect.c
index ec39f730a0bf..fbbb3ab70818 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -84,6 +84,11 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
 				if (!page || PageKsm(page))
 					continue;
 
+				/* Also skip shared copy-on-write pages */
+				if (is_cow_mapping(vma->vm_flags) &&
+				    page_mapcount(page) != 1)
+					continue;
+
 				/* Avoid TLB flush if possible */
 				if (pte_protnone(oldpte))
 					continue;
-- 
1.8.3.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2018-01-16 19:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-16 19:28 [PATCH] mm: numa: numa balancing performance problem Henry Willard
2018-01-16 19:28 ` Henry Willard [this message]
2018-01-16 21:26   ` [PATCH] mm: numa: Do not trap faults on shared data section pages Mel Gorman
2018-01-17  0:45     ` Henry Willard
2018-01-17 18:23     ` Christopher Lameter
2018-01-19  1:06       ` Henry Willard
2018-01-20  2:12         ` Christopher Lameter
2018-01-23  0:41           ` Henry Willard

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=1516130924-3545-2-git-send-email-henry.willard@oracle.com \
    --to=henry.willard@oracle.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jglisse@redhat.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=pombredanne@nexb.com \
    --cc=zi.yan@cs.rutgers.edu \
    /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