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
Subject: Re: [Xen-devel] [PATCH 5/7] xen/setup: Transfer MFNs from non-RAM E820 entries and gaps to E820 RAM
Date: Fri, 6 Apr 2012 17:02:30 -0400 [thread overview]
Message-ID: <20120406210230.GC26309@phenom.dumpdata.com> (raw)
In-Reply-To: <20120403131344.GB12464@phenom.dumpdata.com>
On Tue, Apr 03, 2012 at 09:13:44AM -0400, Konrad Rzeszutek Wilk wrote:
> On Tue, Apr 03, 2012 at 09:48:43AM +0100, David Vrabel wrote:
> > On 30/03/12 21:37, Konrad Rzeszutek Wilk wrote:
> > > We will now get:
> > >
> > > -Released 283999 pages of unused memory
> > > +Exchanged 283999 pages
> > > .. snip..
> > > -Memory: 6487732k/9208688k available (5817k kernel code, 1136060k absent, 1584896k reserved, 2900k data, 692k init)
> > > +Memory: 6503888k/8072692k available (5817k kernel code, 1136060k absent, 432744k reserved, 2900k data, 692k init)
> >
> > This isn't correct. You've have lost ~1 GB of memory which are the
> > pages that were supposed to be moved. The additional 1GB of reserved
> > memory in the old case is the balloon.
>
> Whoops.
> >
> > In xen_memory_setup() where it loops through the e820 to clip the RAM
> > regions you need to factor in the additional memory you've moved. In
> > this loop you may need to count the pages in the RAM region instead of
> > the simple (addr < mem_end) test. Take care with RAM regions with
> > partial pages and the like.
>
> <nods> I did some more exhaustive testing and hit some issues
.. which is that moving the MFNs in the P2M is fine from the Linux kernel perspective
but the changes won't be reflected in the M2P. To make the M2P have the new
PFNs I have to use the populate_physmap hypercall.
A new-ish version will be posted soon.
next prev parent reply other threads:[~2012-04-06 21:02 UTC|newest]
Thread overview: 19+ 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 [this message]
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
2012-04-09 16:56 ` Jan Beulich
2012-04-09 21:49 ` Konrad Rzeszutek Wilk
2012-03-30 20:37 ` [PATCH 7/7] xen/setup: Only print "Freeing XXX-YYY pfn range: Z pages freed" if Z > 0 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=20120406210230.GC26309@phenom.dumpdata.com \
--to=konrad.wilk@oracle.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).