Mailing List Archive

[PATCH] xenpaging: munmap all pages after page-in
# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1320254973 -3600
# Node ID 79677f532a2406ca501250b50fa8b33965a8d7d7
# Parent 951a9879c34bee1dd2fa0329a541ae089f271c11
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@aepfle.de>

diff -r 951a9879c34b -r 79677f532a24 tools/xenpaging/pagein.c
--- a/tools/xenpaging/pagein.c
+++ b/tools/xenpaging/pagein.c
@@ -44,7 +44,7 @@ static void *page_in(void *arg)
/* 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;
pthread_exit(NULL);

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [PATCH] xenpaging: munmap all pages after page-in [ In reply to ]
Olaf Hering writes ("[Xen-devel] [PATCH] xenpaging: munmap all pages after page-in"):
> xenpaging: munmap all pages after page-in

Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

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