WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [Patch] the interface of invalidating qemu mapcache

To: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [Patch] the interface of invalidating qemu mapcache
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Fri, 26 Jan 2007 17:43:03 +0000
Delivery-date: Fri, 26 Jan 2007 09:42:42 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <666CC8FCE3247C4DA876BA979059781A5C28FB@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcbhNpSgnLlsyleeR3aZurd/xO5mYAAmjw1QAHpYsZANUy+bAAbmp7kgAzBSt0AAA6R4dg==
Thread-topic: [Patch] the interface of invalidating qemu mapcache
User-agent: Microsoft-Entourage/11.3.3.061214
On 26/1/07 4:27 pm, "Cui, Dexuan" <dexuan.cui@xxxxxxxxx> wrote:

> The patch exports a function invalidate_qemu_mapcache() in
> unmodified_drivers/linux-2.6/platform-pci/platform-pci.c, so HVM balloon
> driver can use it directly. Note: considering IA32 guest may run on both
> IA32 host and IA32E host, the size of the memory block HVM balloon
> driver wants to release MUST be 1M bytes and the address of the memory
> block MUST be 1M-byte boundary aligned; if there are several such 1M
> memory blocks, HVM balloon driver should call invalidate_qemu_mapcache()
> several times, 1 block each time. The execution of
> invalidate_qemu_mapcache() is not slow -- 1000 times of invocation may
> take about 0.4 second.

The balloon driver is likely to free up pages scattered all over the memory
map. Since it does this in batches it will probably be easiest to simply
blow the entire mapcache at the end of a batch. This will make your patch a
lot smaller!

Making effective use of 1MB selective zapping will actually be hard for the
balloon driver -- either it will make a zap request for each page it frees
(which will be slow) or it will need to maintain a bitmap it fills in during
its batched work which it then scans-and-zaps at the end. It is probably not
worth the effort.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel