aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenpaging
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2011-06-10 10:47:23 +0200
committerOlaf Hering <olaf@aepfle.de>2011-06-10 10:47:23 +0200
commit46a3d35ca3f76b2b2b0e3fdf9036ec1e279ef8cb (patch)
tree69829079b25ea22edb980f09ef55a2091d8cda09 /tools/xenpaging
parentfd1b11466ee8a3ddc78dee1696e6934b48e01939 (diff)
downloadxen-46a3d35ca3f76b2b2b0e3fdf9036ec1e279ef8cb.tar.gz
xen-46a3d35ca3f76b2b2b0e3fdf9036ec1e279ef8cb.tar.bz2
xen-46a3d35ca3f76b2b2b0e3fdf9036ec1e279ef8cb.zip
xenpaging: start paging in the middle of gfn range
Set the starting gfn to somewhere in the middle of the gfn range to avoid paging during BIOS startup. This can speedup booting of a guest. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/xenpaging')
-rw-r--r--tools/xenpaging/policy_default.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/xenpaging/policy_default.c b/tools/xenpaging/policy_default.c
index 83fe830309..0d32c94859 100644
--- a/tools/xenpaging/policy_default.c
+++ b/tools/xenpaging/policy_default.c
@@ -69,6 +69,10 @@ int policy_init(xenpaging_t *paging)
/* Don't page out page 0 */
set_bit(0, bitmap);
+ /* Start in the middle to avoid paging during BIOS startup */
+ current_gfn = max_pages / 2;
+ current_gfn -= paging->num_pages / 2;
+
rc = 0;
out:
return rc;