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

Re: [Xen-devel] [PATCH] qemu-dm: add command to flush buffer cache



On Thu, 12 Jan 2012, Olaf Hering wrote:
> Add support for a xenstore dm command to flush qemu's buffer cache.
> 
> qemu will just keep mapping pages and not release them, which causes problems
> for the memory pager (since the page is mapped, it won't get paged out). When
> the pager has trouble finding a page to page out, it asks qemu to flush its
> buffer, which releases all the page mappings. This makes it possible to find
> pages to swap out agian.
> 
> Signed-off-by: Patrick Colp <Patrick.Colp@xxxxxxxxxx>
> Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
> 
> ---
>  ioemu-remote/xenstore.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> --- ioemu-remote/xenstore.c
> +++ ioemu-remote/xenstore.c
> @@ -927,6 +927,9 @@ static void xenstore_process_dm_command_
>          do_pci_add(par);
>          free(par);
>  #endif
> +    } else if (!strncmp(command, "flush-cache", len)) {
> +        fprintf(logfile, "dm-command: flush caches\n");
> +        qemu_invalidate_map_cache();
>      } else {
>          fprintf(logfile, "dm-command: unknown command\"%*s\"\n", len, 
> command);
>      }

I guess it is not possible to send the usual ioreq with type ==
IOREQ_TYPE_INVALIDATE because the pager is separate from the hypervisor,
correct?

_______________________________________________
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®.