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] [PATCH 07/18] xenpaging/qemu-dm: add command to flush buffer

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 07/18] xenpaging/qemu-dm: add command to flush buffer cache.
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Fri, 15 Oct 2010 16:12:09 +0200
Delivery-date: Fri, 15 Oct 2010 07:19:10 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1287151935; l=1046; s=domk; d=aepfle.de; h=References:Subject:To:From:Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=Idw6pKHzhc37XYwS5c47XizhiUA=; b=nWiEnu8uUnh8QQhhADYzyUknPWBC/oLxfNiuTqZnMbgKEMCYQqBK7bReoI6yTqp6oYP wWpXJ2opQfH/+uCFXa/dSvR0wquVSq9Qhj7i5knGkklUNyUba+nrBm2qnt5256E6v+vEu XwBbt6YvRZTgq6xBm7tSxe8AOCphUSbQTLA=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20101015141202.309585877@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.48-4.4
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@xxxxxxxxxx>
Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

---
 tools/ioemu-remote/xenstore.c |    3 +++
 1 file changed, 3 insertions(+)

--- xen-4.0.1-testing.orig/tools/ioemu-remote/xenstore.c
+++ xen-4.0.1-testing/tools/ioemu-remote/xenstore.c
@@ -1021,6 +1021,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);
     }


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