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 04/21] xenpaging: populate paged-out pages unconditio

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 04/21] xenpaging: populate paged-out pages unconditionally
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Fri, 26 Nov 2010 14:49:05 +0100
Delivery-date: Fri, 26 Nov 2010 05:51:49 -0800
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1290779348; l=889; s=domk; d=aepfle.de; h=References:Subject:To:From:Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=7OuI3MnDqKsG6sEcUX4FpraSdTg=; b=oGhatEObv5s3fnGH+0dDeY3rrhaAq3aYCqB/kGqJecoKTt+j2ucCTZyJIypSicKtpJc iaLCUxKWyFgHZeySDHT7EUyPMeseY01DAv43ykC1z+kxr4exy+V4PpphVa1dq/mnV2Cdt 1io09+c+hip3WtJOxNB3Gpgy0H3/+4ZxO5s=
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: <20101126134901.384130351@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.48-4.4
Populate a page unconditionally to avoid missing a page-in request.
If the page is already in the process of being paged-in, the this vcpu
will be stopped and later resumed once the page content is usable again.

This matches other p2m_mem_paging_populate usage in the source tree.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

---
 xen/common/grant_table.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- xen-unstable.hg-4.1.22433.orig/xen/common/grant_table.c
+++ xen-unstable.hg-4.1.22433/xen/common/grant_table.c
@@ -156,10 +156,11 @@ static int __get_paged_frame(unsigned lo
 
     if ( p2m_is_valid(p2mt) ) {
         *frame = mfn_x(mfn);
-        if ( p2m_is_paged(p2mt) )
-            p2m_mem_paging_populate(p2m, gfn);
         if ( p2m_is_paging(p2mt) )
+        {
+            p2m_mem_paging_populate(p2m, gfn);
             rc = GNTST_eagain;
+        }
     } else {
        *frame = INVALID_MFN;
        rc = GNTST_bad_page;


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