From: Mike Kravetz <mike.kravetz@oracle.com>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, x86@kernel.org
Cc: Hugh Dickins <hughd@google.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Hillf Danton <hillf.zj@alibaba-inc.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
David Rientjes <rientjes@google.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
Steve Capper <steve.capper@linaro.org>,
Andrew Morton <akpm@linux-foundation.org>,
Mike Kravetz <mike.kravetz@oracle.com>
Subject: [RFC PATCH 0/2] hugetlb: If PMD sharing is possible, align to PUD_SIZE
Date: Mon, 28 Mar 2016 18:12:48 -0700 [thread overview]
Message-ID: <1459213970-17957-1-git-send-email-mike.kravetz@oracle.com> (raw)
PMD sharing for hugetlb mappings has been present for quite some time.
However, specific conditions must be met for mappings to be shared.
One of those conditions is that the mapping must include all pages that
can be mapped by a PUD. To help facilitate this, the mapping should be
PUD_SIZE aligned. The only way for a user to get PUD_SIZE alignment is
to pass an address to mmap() or shmat(). If the user does not pass an
address the mapping will be huge page size aligned.
To better utilize huge PMD sharing, attempt to PUD_SIZE align mappings
if the following conditions are met:
- Address passed to mmap or shmat is NULL
- The mapping is flaged as shared
- The mapping is at least PUD_SIZE in length
If a PUD_SIZE aligned mapping can not be created, then fall back to a
huge page size mapping.
Currently, only arm64 and x86 support PMD sharing. x86 has
HAVE_ARCH_HUGETLB_UNMAPPED_AREA (where code changes are made). arm64
uses the architecture independent code.
Mike Kravetz (2):
mm/hugetlbfs: Attempt PUD_SIZE mapping alignment if PMD sharing
enabled
x86/hugetlb: Attempt PUD_SIZE mapping alignment if PMD sharing enabled
arch/x86/mm/hugetlbpage.c | 64 ++++++++++++++++++++++++++++++++++++++++++++---
fs/hugetlbfs/inode.c | 29 +++++++++++++++++++--
2 files changed, 88 insertions(+), 5 deletions(-)
--
2.4.3
--
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>
next reply other threads:[~2016-03-29 1:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-29 1:12 Mike Kravetz [this message]
2016-03-29 1:12 ` [RFC PATCH 1/2] mm/hugetlbfs: Attempt PUD_SIZE mapping alignment if PMD sharing enabled Mike Kravetz
2016-03-29 3:50 ` Hillf Danton
2016-03-29 16:29 ` Mike Kravetz
2016-03-31 2:18 ` Naoya Horiguchi
2016-03-31 16:45 ` Mike Kravetz
2016-03-29 1:12 ` [RFC PATCH 2/2] x86/hugetlb: " Mike Kravetz
2016-03-29 8:35 ` Ingo Molnar
2016-03-29 17:05 ` Mike Kravetz
2016-03-31 2:26 ` Naoya Horiguchi
2016-03-31 11:38 ` Ingo Molnar
2016-03-31 16:32 ` Mike Kravetz
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=1459213970-17957-1-git-send-email-mike.kravetz@oracle.com \
--to=mike.kravetz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=dave.hansen@linux.intel.com \
--cc=hillf.zj@alibaba-inc.com \
--cc=hpa@zytor.com \
--cc=hughd@google.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=rientjes@google.com \
--cc=steve.capper@linaro.org \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
--cc=x86@kernel.org \
/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).