From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: David Vrabel <david.vrabel@citrix.com>
Cc: xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org,
Jan Beulich <JBeulich@suse.com>
Subject: Re: [Xen-devel] [PATCH 6/7] xen/setup: Make dom0_mem=XGB behavior be similar to classic Xen kernels.
Date: Fri, 6 Apr 2012 16:59:09 -0400 [thread overview]
Message-ID: <20120406205909.GA26309@phenom.dumpdata.com> (raw)
In-Reply-To: <4F7ABBC4.4050106@citrix.com>
On Tue, Apr 03, 2012 at 09:58:44AM +0100, David Vrabel wrote:
> On 30/03/12 21:37, Konrad Rzeszutek Wilk wrote:
> > Meaning that we will allocate up to XGB and not consider the
> > rest of the memory as a possible balloon goal.
>
> I agree with Jan when he commented on the equivalent Xen patch for this
> behaviour. The current behaviour is better than the classic one.
Current behavior in the hypervisor or with current Linux kernel?
>
> With your new behaviour it will no longer possible to specify an
> unlimited balloon but a limited number of initial pages. This is
> behaviour that Jan said he used.
I am not sure I see the problem - I mean if one uses:
dom0_mem=min:8G,max:16G
I understand that we want to start at 8GB and if the user
choose to - balloon up to 16GB.
But doing this:
dom0_mem=8G
and allocating pagetables up to .. say 32GB, seems counter-intuive
as the effect is similar to having no 'dom0_mem' except that the initial
size is smaller.
>
> This problem is better solved by improving the documentation. A review
> of the xen.org wiki where dom0_mem is mentioned would be a good start,
> and an update to the recently added section for distro developers.
>
> David
>
> > This results in /proc/meminfo reporting:
> >
> > -MemTotal: 2845024 kB
> > -MemFree: 2497716 kB
> > +MemTotal: 2927192 kB
> > +MemFree: 2458952 kB
> > ...
> > -DirectMap4k: 8304640 kB
> > +DirectMap4k: 3063808 kB
> > DirectMap2M: 0 kB
> >
> > on a 8GB machine with 'dom0_mem=3GB' on the Xen hypervisor line.
> >
> > Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > ---
> > arch/x86/xen/setup.c | 16 ++++++++++++++++
> > 1 files changed, 16 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
> > index 2a12143..4e4aa8e 100644
> > --- a/arch/x86/xen/setup.c
> > +++ b/arch/x86/xen/setup.c
> > @@ -261,11 +261,27 @@ static unsigned long __init xen_get_max_pages(void)
> > * the current maximum rather than the static maximum. In this
> > * case the e820 map provided to us will cover the static
> > * maximum region.
> > + *
> > + * The dom0_mem=min:X,max:Y tweaks options differently depending
> > + * on the version, but in general this is what we get:
> > + * | XENMEM_maximum_reser | nr_pages
> > + * --------------++-----------------------+-------------------
> > + * no dom0_mem | INT_MAX | the max_phys_pfn
> > + * =3G | INT_MAX | 786432
> > + * =max:3G | 786432 | 786432
> > + * =min:1G,max:3G| 262144 | 786432
> > + *
> > + * The =3G is often used and it lead to us initially setting
> > + * 786432 and allowing dom0 to balloon up to the max_physical_pfn.
> > + * This is at odd with the classic XenOClassic so lets emulate
> > + * the classic behavior.
> > */
> > if (xen_initial_domain()) {
> > ret = HYPERVISOR_memory_op(XENMEM_maximum_reservation, &domid);
> > if (ret > 0)
> > max_pages = ret;
> > + if (ret == -1UL)
> > + max_pages = xen_start_info->nr_pages;
> > }
> >
> > return min(max_pages, MAX_DOMAIN_PAGES);
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2012-04-06 21:04 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-30 20:37 [PATCH] fix /proc/meminfo reporting (v1) Konrad Rzeszutek Wilk
2012-03-30 20:37 ` [PATCH 1/7] xen/p2m: Move code around to allow for better re-usage Konrad Rzeszutek Wilk
2012-03-30 20:37 ` [PATCH 2/7] xen/p2m: Allow alloc_p2m_middle to call reserve_brk depending on argument Konrad Rzeszutek Wilk
2012-03-30 20:37 ` [PATCH 3/7] xen/p2m: Collapse early_alloc_p2m_middle redundant checks Konrad Rzeszutek Wilk
2012-03-30 20:37 ` [PATCH 4/7] xen/p2m: An early bootup variant of set_phys_to_machine Konrad Rzeszutek Wilk
2012-03-30 20:37 ` [PATCH 5/7] xen/setup: Transfer MFNs from non-RAM E820 entries and gaps to E820 RAM Konrad Rzeszutek Wilk
2012-04-03 8:48 ` [Xen-devel] " David Vrabel
2012-04-03 13:13 ` Konrad Rzeszutek Wilk
2012-04-06 21:02 ` Konrad Rzeszutek Wilk
2012-03-30 20:37 ` [PATCH 6/7] xen/setup: Make dom0_mem=XGB behavior be similar to classic Xen kernels Konrad Rzeszutek Wilk
2012-04-03 8:58 ` [Xen-devel] " David Vrabel
2012-04-03 9:46 ` Jan Beulich
2012-04-06 21:01 ` Konrad Rzeszutek Wilk
2012-04-09 16:39 ` Jan Beulich
2012-04-09 21:33 ` Konrad Rzeszutek Wilk
2012-04-06 20:59 ` Konrad Rzeszutek Wilk [this message]
2012-04-09 16:56 ` Jan Beulich
2012-04-09 21:49 ` Konrad Rzeszutek Wilk
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=20120406205909.GA26309@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=david.vrabel@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--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 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).