From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
David Vrabel <david.vrabel@citrix.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [Xen-devel] Re: [PATCH 0/6] xen: don't call vmalloc_sync_all() when mapping foreign pages
Date: Thu, 22 Sep 2011 14:19:51 -0700 [thread overview]
Message-ID: <4E7BA677.9090907@goop.org> (raw)
In-Reply-To: <alpine.DEB.2.00.1109221131390.8700@kaball-desktop>
On 09/22/2011 04:06 AM, Stefano Stabellini wrote:
> On Wed, 21 Sep 2011, Jeremy Fitzhardinge wrote:
>> On 09/21/2011 03:42 AM, Stefano Stabellini wrote:
>>> On Thu, 15 Sep 2011, Jeremy Fitzhardinge wrote:
>>>> This series is relying on regular ram mappings are already synced to all
>>>> tasks, but I'm not sure that's necessarily guaranteed (for example, if
>>>> you hotplug new memory into the domain, the new pages won't be mapped
>>>> into every mm unless they're synced).
>>> the series is using GFP_KERNEL, so this problem shouldn't occur, right?
>> What properties do you think GFP_KERNEL guarantees?
> That the memory is below 4G and always mapped in the kernel 1:1 region.
Hm, but that's not quite the same thing as "mapped into every
pagetable". Lowmem pages always have a kernel virtual address, and its
always OK to touch them at any point in kernel code[*] because one can
rely on the fault handler to create mappings as needed - but that
doesn't mean they're necessarily mapped by present ptes in the current
pagetable.
[*] - except NMI handlers
> Regarding memory hotplug it looks like that x86_32 is mapping new memory
> ZONE_HIGHMEM, therefore avoiding any problems with GFP_KERNEL allocations.
> On the other hand x86_64 is mapping the memory ZONE_NORMAL and calling
> init_memory_mapping on the new range right away. AFAICT changes to
> the 1:1 mapping in init_mm are automatically synced across all mm's
> because the pgd is shared?
TBH I'm not sure. vmalloc_sync_one/all does seem to do *something* on
64-bit, but I was never completely sure what regions of the address
space were already shared. I *think* it might be that the pgd and pud
are not shared, but the pmd down is, so if you add a new pmd you need to
sync it into all the puds (and puds into pgds if you add a new one of
those).
But I'd be happier pretending that vmalloc_sync_* just doesn't exist,
and deal with it at the hypercall level - in the short term, by just
making sure that the callers touch all those pages before passing them
into the hypercall.
J
next prev parent reply other threads:[~2011-09-22 21:20 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-15 12:40 [PATCH 0/6] xen: don't call vmalloc_sync_all() when mapping foreign pages David Vrabel
2011-09-15 12:40 ` David Vrabel
2011-09-15 12:40 ` [PATCH 1/6] xen: add functions for mapping foreign pages over pages David Vrabel
2011-09-15 12:40 ` [PATCH 2/6] block: xen-blkback: use API provided by xenbus module to map rings David Vrabel
2011-09-15 12:40 ` David Vrabel
2011-09-15 12:40 ` [PATCH 3/6] net: xen-netback: " David Vrabel
2011-09-15 12:40 ` [PATCH 4/6] xen: xen-pciback: use xenbus_map_ring_page() " David Vrabel
2011-09-15 12:40 ` [PATCH 5/6] xen: xenbus: remove xenbus_map_ring_valloc() and xenbus_map_ring_vfree() David Vrabel
2011-09-15 12:40 ` [PATCH 6/6] mm: remove vmalloc_sync_all() from alloc_vm_area() David Vrabel
2011-09-15 21:37 ` [PATCH 0/6] xen: don't call vmalloc_sync_all() when mapping foreign pages Jeremy Fitzhardinge
2011-09-21 10:42 ` Stefano Stabellini
2011-09-21 10:42 ` Stefano Stabellini
2011-09-21 18:57 ` [Xen-devel] " Jeremy Fitzhardinge
2011-09-22 11:06 ` Stefano Stabellini
2011-09-22 21:19 ` Jeremy Fitzhardinge [this message]
2011-09-23 10:53 ` Stefano Stabellini
2011-09-23 10:53 ` Stefano Stabellini
2011-09-23 11:18 ` [Xen-devel] " David Vrabel
2011-09-23 11:18 ` David Vrabel
2011-09-21 14:44 ` [Xen-devel] " David Vrabel
2011-09-23 15:11 ` David Vrabel
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=4E7BA677.9090907@goop.org \
--to=jeremy@goop.org \
--cc=akpm@linux-foundation.org \
--cc=david.vrabel@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.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 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.