From: Rik van Riel <riel@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Greg Kurz <gkurz@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v2] util/mmap-alloc: fix hugetlb support on ppc64
Date: Wed, 2 Dec 2015 15:37:17 -0500 [thread overview]
Message-ID: <565F567D.5070601@redhat.com> (raw)
In-Reply-To: <1449086675-11836-1-git-send-email-mst@redhat.com>
On 12/02/2015 03:04 PM, Michael S. Tsirkin wrote:
> Since commit 8561c9244ddf1122d "exec: allocate PROT_NONE pages on top of
> RAM", it is no longer possible to back guest RAM with hugepages on ppc64
> hosts:
>
> mmap(NULL, 285212672, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x3fff57000000
> mmap(0x3fff57000000, 268435456, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED, 19, 0) = -1 EBUSY (Device or resource busy)
>
> This is because on ppc64, Linux fixes a page size for a virtual address
> at mmap time, so we can't switch a range of memory from anonymous
> small pages to hugetlbs with MAP_FIXED.
>
> See commit d0f13e3c20b6fb73ccb467bdca97fa7cf5a574cd
> ("[POWERPC] Introduce address space "slices"") in Linux
> history for the details.
>
> Detect this and create the PROT_NONE mapping using the same fd.
>
> Naturally, this makes the guard page bigger with hugetlbfs.
>
> Based on patch by Greg Kurz.
>
> Cc: Rik van Riel <riel@redhat.com>
> CC: Greg Kurz <gkurz@linux.vnet.ibm.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Rik van Riel <riel@redhat.com>
--
All rights reversed
prev parent reply other threads:[~2015-12-02 20:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-02 20:04 [Qemu-devel] [PATCH v2] util/mmap-alloc: fix hugetlb support on ppc64 Michael S. Tsirkin
2015-12-02 20:26 ` Greg Kurz
2015-12-02 20:37 ` Rik van Riel [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=565F567D.5070601@redhat.com \
--to=riel@redhat.com \
--cc=gkurz@linux.vnet.ibm.com \
--cc=kwolf@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.