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-devel] [PATCH 17 of 22] xenpaging: start paging in the middle of gf

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 17 of 22] xenpaging: start paging in the middle of gfn range
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Fri, 10 Jun 2011 11:13:06 +0200
Delivery-date: Fri, 10 Jun 2011 02:33:35 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1307697188; l=926; s=domk; d=aepfle.de; h=To:From:Date:References:In-Reply-To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:X-RZG-CLASS-ID: X-RZG-AUTH; bh=IVukHWaC9txktOq8noV/07vO1eY=; b=DQQ71KZTnIr/vNUcjJHDne1qy5/UcWmTQVYjxY3lef/gOtfqYH8l8qDnqAVu/3AFVZG EE3Wc/A3m6epm4LBcBPN88yyPZLuheXl7xkQC/0SP/52SYvXdvJ89YzvgaPyukM0NkNdh uZXYsYRCzIRVQaJ8/Ul9dIdM11S6KYNBZa0=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1307697169@xxxxxxxxxxxx>
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: <patchbomb.1307697169@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.7.5
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1307695643 -7200
# Node ID 6c7c51f831bfe143093146d67a205b6660490021
# Parent  6fafd6e85a20f667c9546d76569049d411b96fb1
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@xxxxxxxxx>

diff -r 6fafd6e85a20 -r 6c7c51f831bf tools/xenpaging/policy_default.c
--- a/tools/xenpaging/policy_default.c  Fri Jun 10 10:47:22 2011 +0200
+++ b/tools/xenpaging/policy_default.c  Fri Jun 10 10:47:23 2011 +0200
@@ -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;
     return rc;

Xen-devel mailing list