From: Keir Fraser <keir.xen@gmail.com>
To: Jan Beulich <JBeulich@novell.com>,
David Vrabel <david.vrabel@citrix.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] x86: use 'dom0_mem' to limit the number of pages for dom0
Date: Tue, 23 Aug 2011 10:26:15 +0100 [thread overview]
Message-ID: <CA7930C7.1FA30%keir.xen@gmail.com> (raw)
In-Reply-To: <4E5388A30200007800052B77@nat28.tlf.novell.com>
On 23/08/2011 10:01, "Jan Beulich" <JBeulich@novell.com> wrote:
>> diff -r 8d6edc3d26d2 -r 1ec6c392d40f xen/arch/x86/domain_build.c
>> --- a/xen/arch/x86/domain_build.c Sat Aug 13 10:14:58 2011 +0100
>> +++ b/xen/arch/x86/domain_build.c Mon Aug 15 11:42:37 2011 +0100
>> @@ -254,6 +254,8 @@ static unsigned long __init compute_dom0
>> }
>> #endif
>>
>> + d->max_pages = min(max_pages, avail);
>
> Only having noticed this hypervisor side change in the patch set as it
> now got applied to -unstable already, I have to object to this: It is
> not memory hotplug compatible (i.e. Dom0, at least with a non-pvops
> kernel, could have got ballooned up past the original limit once memory
> got added to the system, whereas now you limit it to what was there
> at boot time).
That's true for any domain isn't it? Yet we've got by so far. The max-mem
can be adjusted after a domain is created, so it's not incompatible.
> If anything, this should be set to just max_pages, not
> considering the amount of available memory at all.
I suspect that nullifies the aim of the patch...
> Besides that the assignment needs to be saturating, as struct domain's
> max_pages member is only "unsigned int", whereas the local variables
> are all "unsigned long". So in the end this should really be an equivalent
> of
>
> d->max_pages = min(max_pages, UINT_MAX);
We should make d->max_pages a ulong or u64.
-- Keir
next prev parent reply other threads:[~2011-08-23 9:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-15 18:08 [PATCH] x86: use 'dom0_mem' to limit the number of pages for dom0 David Vrabel
2011-08-16 0:31 ` Konrad Rzeszutek Wilk
2011-08-16 12:29 ` David Vrabel
2011-08-16 12:51 ` Ian Campbell
2011-08-16 13:11 ` David Vrabel
2011-08-19 15:35 ` David Vrabel
2011-08-23 9:01 ` Jan Beulich
2011-08-23 9:26 ` Keir Fraser [this message]
2011-08-23 9:41 ` Jan Beulich
2011-08-23 12:03 ` Keir Fraser
2011-08-23 15:54 ` 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=CA7930C7.1FA30%keir.xen@gmail.com \
--to=keir.xen@gmail.com \
--cc=JBeulich@novell.com \
--cc=david.vrabel@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 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).