From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH v2 2/2] xen/setup: Remap Xen Identity Mapped RAM Date: Mon, 28 Jul 2014 14:18:17 +0100 Message-ID: <53D64D99.3000101@citrix.com> References: <1405814495-10868-1-git-send-email-mrushton@amazon.com> <1405814495-10868-2-git-send-email-mrushton@amazon.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1405814495-10868-2-git-send-email-mrushton@amazon.com> Sender: linux-kernel-owner@vger.kernel.org To: Matt Rushton , konrad.wilk@oracle.com, boris.ostrovsky@oracle.com Cc: msw@amazon.com, linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com, Matt Rushton List-Id: xen-devel@lists.xenproject.org On 20/07/14 01:01, Matt Rushton wrote: > Instead of ballooning up and down dom0 memory this remaps the existing mfns > that were replaced by the identity map. The reason for this is that the > existing implementation ballooned memory up and and down which caused dom0 > to have discontiguous pages. In some cases this resulted in the use of bounce > buffers which reduced network I/O performance significantly. This change will > honor the existing order of the pages with the exception of some boundary > conditions. > > To do this we need to update both the Linux p2m table and the Xen m2p table. > Particular care must be taken when updating the p2m table since it's important > to limit table memory consumption and reuse the existing leaf pages which get > freed when an entire leaf page is set to the identity map. To implement this, > mapping updates are grouped into blocks with table entries getting cached > temporarily and then released. > > On my test system before: > Total pages: 2105014 > Total contiguous: 1640635 > > After: > Total pages: 2105014 > Total contiguous: 2098904 This looks like a worthwhile improvement but... > arch/x86/xen/setup.c | 370 +++++++++++++++++++++++++++++++++++++++----------- ... Ew :( It will take me a bit longer before I can give this a proper review. David