From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
george.dunlap@eu.citrix.com, tim@xen.org,
Ian Jackson <ian.jackson@eu.citrix.com>,
David Vrabel <david.vrabel@citrix.com>,
xen-devel@lists.xenproject.org, roger.pau@citrix.com
Subject: Re: Is: PVH - how to solve maxmem != memory scenario? Was:Re: [PATCH] libxl: create PVH guests with max memory assigned
Date: Tue, 5 Aug 2014 11:41:45 -0400 [thread overview]
Message-ID: <20140805154145.GE19858@laptop.dumpdata.com> (raw)
In-Reply-To: <53E11087020000780002987E@mail.emea.novell.com>
On Tue, Aug 05, 2014 at 04:12:39PM +0100, Jan Beulich wrote:
> >>> On 05.08.14 at 16:48, <konrad.wilk@oracle.com> wrote:
> > On Tue, Aug 05, 2014 at 03:36:19PM +0100, Jan Beulich wrote:
> >> >>> On 05.08.14 at 16:18, <konrad.wilk@oracle.com> wrote:
> >> > Mukesh's feeling was that it is an PV.
> >> >
> >> > I believe George is the opinion of 'HVM' without the device model.
> >>
> >> I think we settled already that this is the intended long term model.
> >> However, what's wrong with having the kernel act PV-like on top of
> >> a PoD-based hypervisor implementation. Simply not touching the
> >> memory amount beyond the initial allocation would already make
> >> things work afaict, i.e. even without any decrease-reservation
> >> calls (and it would therefore desirable but mostly cosmetic to get
> >> them done as early as possible).
> >
> > Linux sets its page-tables (beyound the bootstrap) using an interesting
> > mechanism which ends up touching those pages.
> >
> > Bear with the explanation as it is a bit complex.
> >
> > When it setups page-tables for a new range of memory (1GB
> > or 2MB, or 4KB ranges - in PVH it will likely be in 2GB
> > since the 1GB cpuid parameter is not exposed), it ends up
> > populating the L2, L3, and L4 (as needed) from the earlier
> > range. When it is done with this range (say 2MB), it will
> > put the page table entries in the physical area of the newly
> > added region.
> >
> > Something like this:
> >
> > +--------------------------------------+
> > | v
> > | 2MB region------------->|<------ 2MB region ---------->
> > +---+------+--------------------+----------+--------------------+
> > | | | | |
> > |pgtable | |pgtable | |
> > +----------+--------------------+----------+--------------------+
> >
> >
> > In effect the pages beyound 'memory' will be touched during bootup.
>
> I don't think that's how it works, as this wouldn't leave any
> contiguous 2M pages for allocation. I think the block sizes are
Ah right.
> much larger, and what memblock_find_in_range() returns isn't
> necessarily always from the most recently added block I'd
> suppose.
That sounds right. The logic in there is to expand the region
for the pagetables in the range as possible. And then when it
can't use it anymore - it will jump to the next one. This is all
from memory when I reviewed it years ago so take this with a grain
of salt please.
>
> Jan
>
next prev parent reply other threads:[~2014-08-05 15:41 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-17 11:02 [PATCH] libxl: create PVH guests with max memory assigned Roger Pau Monne
2014-07-18 16:49 ` Konrad Rzeszutek Wilk
2014-07-18 17:00 ` Roger Pau Monné
2014-07-18 17:11 ` Andrew Cooper
2014-07-21 10:16 ` Ian Campbell
2014-07-18 20:53 ` Konrad Rzeszutek Wilk
2014-08-05 8:57 ` Ian Campbell
2014-07-18 17:19 ` Olaf Hering
2014-07-18 19:33 ` Konrad Rzeszutek Wilk
2014-08-01 15:34 ` Roger Pau Monné
2014-08-04 18:44 ` Konrad Rzeszutek Wilk
2014-08-05 8:55 ` Ian Campbell
2014-08-05 9:34 ` David Vrabel
2014-08-05 11:08 ` Roger Pau Monné
2014-08-05 14:06 ` Ian Campbell
2014-08-05 14:10 ` George Dunlap
2014-08-05 21:22 ` Mukesh Rathor
2014-08-05 14:18 ` Is: PVH - how to solve maxmem != memory scenario? Was:Re: " Konrad Rzeszutek Wilk
2014-08-05 14:36 ` Jan Beulich
2014-08-05 14:48 ` Konrad Rzeszutek Wilk
2014-08-05 15:12 ` Jan Beulich
2014-08-05 15:41 ` Konrad Rzeszutek Wilk [this message]
2014-08-05 15:05 ` David Vrabel
2014-08-05 15:40 ` Konrad Rzeszutek Wilk
2014-08-05 15:51 ` Jan Beulich
2014-08-05 15:56 ` Konrad Rzeszutek Wilk
2014-08-05 16:07 ` Jan Beulich
2014-08-05 19:45 ` Tim Deegan
2014-08-05 21:36 ` Mukesh Rathor
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=20140805154145.GE19858@laptop.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=david.vrabel@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=roger.pau@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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).