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 1/6] xenpaging: correct dropping pages to avoid full

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 1/6] xenpaging: correct dropping pages to avoid full ring buffer
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Sun, 16 Jan 2011 17:32:30 +0100
Delivery-date: Sun, 16 Jan 2011 08:36:25 -0800
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1295195550; l=1421; s=domk; d=aepfle.de; h=References:Subject:To:From:Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=IqD6i/dZdyIEAWKX6MWhSAP02GE=; b=HWY7PZzwHHRH1SRaVBFnSOmaoiEt65RM3MXNZqmRMmYkIrZI83RQGGivf4/X0HyUTay i4lNfg7s/WsYc056fiy6Efm4ERMokvaNf6Pd1JdLhKw7SAZEc3+B9Ae6s8kOzaSjYe0Z/ 69Hj5DXTDCArORkPml0S/YErn0SU0yXfCb4=
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: <20110116163229.044047464@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.48-4.4
xenpaging uses the mem_event ring buffer, which expects request/response
pairs to make progress. The previous patch, which tried to establish a
one-way communication from Xen to xenpaging, stalled the guest once the
buffer was filled up with requests. A simple fix is to take the slow path
and let p2m_mem_paging_resume() consume the response from xenpaging.
This makes room for yet another request/response pair and avoids hanging
guests.

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

---
 tools/xenpaging/xenpaging.c |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

--- xen-unstable.hg-4.1.22764.orig/tools/xenpaging/xenpaging.c
+++ xen-unstable.hg-4.1.22764/tools/xenpaging/xenpaging.c
@@ -653,19 +653,19 @@ int main(int argc, char *argv[])
                         ERROR("Error populating page");
                         goto out;
                     }
+                }
 
-                    /* Prepare the response */
-                    rsp.gfn = req.gfn;
-                    rsp.p2mt = req.p2mt;
-                    rsp.vcpu_id = req.vcpu_id;
-                    rsp.flags = req.flags;
+                /* Prepare the response */
+                rsp.gfn = req.gfn;
+                rsp.p2mt = req.p2mt;
+                rsp.vcpu_id = req.vcpu_id;
+                rsp.flags = req.flags;
 
-                    rc = xenpaging_resume_page(paging, &rsp, 1);
-                    if ( rc != 0 )
-                    {
-                        ERROR("Error resuming page");
-                        goto out;
-                    }
+                rc = xenpaging_resume_page(paging, &rsp, 1);
+                if ( rc != 0 )
+                {
+                    ERROR("Error resuming page");
+                    goto out;
                 }
 
                 /* Evict a new page to replace the one we just paged in */


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