|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [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
|
|
|
|
|