2014-01-02 20:09:07 +01:00
|
|
|
Subject: xenpaging/qemu-dm: add command to flush buffer cache.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
Already-Signed-off-by: Patrick Colp <Patrick.Colp@citrix.com>
|
|
|
|
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
|
|
|
|
|
|
|
---
|
|
|
|
tools/qemu-xen-traditional-dir-remote/xenstore.c | 3 +++
|
|
|
|
1 file changed, 3 insertions(+)
|
|
|
|
|
2015-01-14 21:58:52 +01:00
|
|
|
Index: xen-4.5.0-testing/tools/qemu-xen-traditional-dir-remote/xenstore.c
|
2014-01-02 20:09:07 +01:00
|
|
|
===================================================================
|
2015-01-14 21:58:52 +01:00
|
|
|
--- xen-4.5.0-testing.orig/tools/qemu-xen-traditional-dir-remote/xenstore.c
|
|
|
|
+++ xen-4.5.0-testing/tools/qemu-xen-traditional-dir-remote/xenstore.c
|
|
|
|
@@ -1006,6 +1006,9 @@ static void xenstore_process_dm_command_
|
2014-01-02 20:09:07 +01:00
|
|
|
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);
|
|
|
|
}
|