[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • 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
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcbhNpSgnLlsyleeR3aZurd/xO5mYAAmjw1QAHpYsZANUy+bAAbmp7kgAzBSt0AAA6R4dg==
  • Thread-topic: [Patch] the interface of invalidating qemu mapcache

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.