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/
Home Products Support Community News


[Xen-changelog] [xen-unstable] xenpaging: munmap all pages after page-in

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xenpaging: munmap all pages after page-in
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Mon, 14 Nov 2011 22:55:09 +0000
Delivery-date: Mon, 14 Nov 2011 14:55:25 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1321292954 0
# Node ID e2cc58b85b6eaf0c4348ee805d4ad011f829cbf6
# Parent  0844b17df7a9dd885e98e505f14fc99c1951b483
xenpaging: munmap all pages after page-in

Do munmap() on all mapped pages, not just the first one.  Without this
change the gfns backing the remaining pages can not be paged out again
because the page count does not go down to 1. This change was missing
from changeset 23827:d1d6abc1db20.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

diff -r 0844b17df7a9 -r e2cc58b85b6e tools/xenpaging/pagein.c
--- a/tools/xenpaging/pagein.c  Fri Nov 11 18:14:35 2011 +0000
+++ b/tools/xenpaging/pagein.c  Mon Nov 14 17:49:14 2011 +0000
@@ -44,7 +44,7 @@
         /* Ignore errors */
         page = xc_map_foreign_pages(pia->xch, pia->dom, PROT_READ, gfns, num);
         if (page)
-            munmap(page, PAGE_SIZE);
+            munmap(page, PAGE_SIZE * num);
     page_in_possible = 0;

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xenpaging: munmap all pages after page-in, Xen patchbot-unstable <=