From: "Jürgen Groß" <jgross@suse.com>
To: Roger Pau Monne <roger.pau@citrix.com>, linux-kernel@vger.kernel.org
Cc: Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
David Airlie <airlied@linux.ie>,
Yan Yankovskyi <yyankovskyi@gmail.com>,
David Hildenbrand <david@redhat.com>,
dri-devel@lists.freedesktop.org, Michal Hocko <mhocko@kernel.org>,
linux-mm@kvack.org, Daniel Vetter <daniel@ffwll.ch>,
xen-devel@lists.xenproject.org,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Dan Williams <dan.j.williams@intel.com>,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH v3 4/4] xen: add helpers to allocate unpopulated memory
Date: Mon, 27 Jul 2020 17:09:07 +0200 [thread overview]
Message-ID: <06e21488-25a6-1c9f-366b-3c2ab63e4632@suse.com> (raw)
In-Reply-To: <20200727091342.52325-5-roger.pau@citrix.com>
On 27.07.20 11:13, Roger Pau Monne wrote:
> To be used in order to create foreign mappings. This is based on the
> ZONE_DEVICE facility which is used by persistent memory devices in
> order to create struct pages and kernel virtual mappings for the IOMEM
> areas of such devices. Note that on kernels without support for
> ZONE_DEVICE Xen will fallback to use ballooned pages in order to
> create foreign mappings.
>
> The newly added helpers use the same parameters as the existing
> {alloc/free}_xenballooned_pages functions, which allows for in-place
> replacement of the callers. Once a memory region has been added to be
> used as scratch mapping space it will no longer be released, and pages
> returned are kept in a linked list. This allows to have a buffer of
> pages and prevents resorting to frequent additions and removals of
> regions.
>
> If enabled (because ZONE_DEVICE is supported) the usage of the new
> functionality untangles Xen balloon and RAM hotplug from the usage of
> unpopulated physical memory ranges to map foreign pages, which is the
> correct thing to do in order to avoid mappings of foreign pages depend
> on memory hotplug.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> I've not added a new memory_type type and just used
> MEMORY_DEVICE_DEVDAX which seems to be what we want for such memory
> regions. I'm unsure whether abusing this type is fine, or if I should
> instead add a specific type, maybe MEMORY_DEVICE_GENERIC? I don't
> think we should be using a specific Xen type at all.
What about introducing MEMORY_DEVICE_VIRT? The comment for
MEMORY_DEVICE_DEVDAX doesn't really fit, as there is no character device
involved.
In the end its the memory management maintainers to decide that.
Other than that you can have my
Reviewed-by: Juergen Gross <jgross@suse.com>
Juergen
next prev parent reply other threads:[~2020-07-27 15:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 9:13 [PATCH v3 0/4] xen/balloon: fixes for memory hotplug Roger Pau Monne
2020-07-27 9:13 ` [PATCH v3 1/4] xen/balloon: fix accounting in alloc_xenballooned_pages error path Roger Pau Monne
2020-08-03 6:18 ` Jürgen Groß
2020-07-27 9:13 ` [PATCH v3 2/4] xen/balloon: make the balloon wait interruptible Roger Pau Monne
2020-08-03 6:18 ` Jürgen Groß
2020-07-27 9:13 ` [PATCH v3 3/4] Revert "xen/balloon: Fix crash when ballooning on x86 32 bit PAE" Roger Pau Monne
2020-08-03 6:19 ` Jürgen Groß
2020-07-27 9:13 ` [PATCH v3 4/4] xen: add helpers to allocate unpopulated memory Roger Pau Monne
2020-07-27 15:09 ` Jürgen Groß [this message]
2020-07-28 11:42 ` [PATCH] xen/balloon: add header guard Roger Pau Monne
2020-07-28 13:56 ` Boris Ostrovsky
2020-07-28 16:48 ` [PATCH v3 4/4] xen: add helpers to allocate unpopulated memory Julien Grall
2020-07-28 16:59 ` Roger Pau Monné
2020-07-28 17:06 ` Andrew Cooper
2020-07-28 17:42 ` Roger Pau Monné
2020-07-28 17:12 ` Julien Grall
2020-07-28 17:44 ` Roger Pau Monné
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=06e21488-25a6-1c9f-366b-3c2ab63e4632@suse.com \
--to=jgross@suse.com \
--cc=airlied@linux.ie \
--cc=boris.ostrovsky@oracle.com \
--cc=dan.carpenter@oracle.com \
--cc=dan.j.williams@intel.com \
--cc=daniel@ffwll.ch \
--cc=david@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=oleksandr_andrushchenko@epam.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
--cc=yyankovskyi@gmail.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).