From: Christopher Lameter <cl@linux.com>
To: Henry Willard <henry.willard@oracle.com>
Cc: Mel Gorman <mgorman@suse.de>,
akpm@linux-foundation.org, 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: Re: [PATCH] mm: numa: Do not trap faults on shared data section pages.
Date: Fri, 19 Jan 2018 20:12:55 -0600 (CST) [thread overview]
Message-ID: <alpine.DEB.2.20.1801192002161.14056@nuc-kabylake> (raw)
In-Reply-To: <2BEFC6DE-7A47-4CB9-AAE5-CEF70453B46F@oracle.com>
[-- Attachment #1: Type: text/plain, Size: 2079 bytes --]
On Thu, 18 Jan 2018, Henry Willard wrote:
> If MPOL_MF_LAZY were allowed and specified things would not work
> correctly. change_pte_range() is unaware of and cana??t honor the
> difference between MPOL_MF_MOVE_ALL and MPOL_MF_MOVE.
Not sure how that relates to what I said earlier... Sorry.
>
> For the case of auto numa balancing, it may be undesirable for shared
> pages to be migrated whether they are also copy-on-write or not. The
> copy-on-write test was added to restrict the effect of the patch to the
> specific situation we observed. Perhaps I should remove it, I dona??t
> understand why it would be desirable to modify the behavior via sysfs.
I think the most common case of shared pages occurs for pages that contain
code. In that case a page may be mapped into hundreds if not thousands of
processes. In particular that is often the case for basic system libraries
like the c library which may actually be mapped into every binary that is
running.
It is very difficult and expensive to unmap these pages from all the
processes in order to migrate them. So some sort of limit would be useful
to avoid unnecessary migration attempts. One example would be to forbid
migrating pages that are mapped in more than 5 processes. Some sysctl know
would be useful here to set the boundary.
Your patch addresses a special case here by forbidding migration of any
page mapped by more than a single process (mapcount !=1).
That would mean f.e. that the complete migration of a set of processes
that rely on sharing data via a memory segment is impossible because those
shared pages can never be moved.
By setting the limit higher that migration would still be possible.
Maybe we can set that limit by default at 5 and allow a higher setting
if users have applications that require a higher mapcoun? F.e. a
common construct is a shepherd task and N worker threads. If those
tasks each have their own address space and only communicate via
a shared data segment then one may want to set the limit higher than N
in order to allow the migration of the group of processes.
next prev parent reply other threads:[~2018-01-20 2:12 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 ` [PATCH] mm: numa: Do not trap faults on shared data section pages Henry Willard
2018-01-16 21:26 ` 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 [this message]
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=alpine.DEB.2.20.1801192002161.14056@nuc-kabylake \
--to=cl@linux.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=henry.willard@oracle.com \
--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