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-changelog

[Xen-changelog] [xen-unstable] xenpaging: optimize p2m_mem_paging_popula

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xenpaging: optimize p2m_mem_paging_populate
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 27 Nov 2010 06:25:23 -0800
Delivery-date: Sat, 27 Nov 2010 06:27:34 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1290781331 0
# Node ID 7fe9cad00e15edebe4623fc14d0ffb5165216910
# Parent  48b10f9a436e6e1cab07773df0f287a2253f6316
xenpaging: optimize p2m_mem_paging_populate

p2m_mem_paging_populate will always put another request in the ring.
To reduce pressure on the ring, place only required requests in the
ring.  If the gfn was already processed by another thread, and the
current vcpu does not need to be paused, p2m_mem_paging_resume will do
nothing with the request.  And also xenpaging will drop the request if
the vcpu does not need a wakeup.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---
 xen/arch/x86/mm/p2m.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff -r 48b10f9a436e -r 7fe9cad00e15 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c     Fri Nov 26 14:21:33 2010 +0000
+++ b/xen/arch/x86/mm/p2m.c     Fri Nov 26 14:22:11 2010 +0000
@@ -2757,11 +2757,11 @@ void p2m_mem_paging_populate(struct p2m_
     p2m_type_t p2mt;
     struct domain *d = p2m->domain;
 
-    memset(&req, 0, sizeof(req));
-
     /* Check that there's space on the ring for this request */
     if ( mem_event_check_ring(d) )
         return;
+
+    memset(&req, 0, sizeof(req));
 
     /* Fix p2m mapping */
     /* XXX: It seems inefficient to have this here, as it's only needed
@@ -2780,6 +2780,11 @@ void p2m_mem_paging_populate(struct p2m_
     {
         vcpu_pause_nosync(v);
         req.flags |= MEM_EVENT_FLAG_VCPU_PAUSED;
+    }
+    else if ( p2mt != p2m_ram_paging_out && p2mt != p2m_ram_paged )
+    {
+        /* gfn is already on its way back and vcpu is not paused */
+        return;
     }
 
     /* Send request to pager */

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xenpaging: optimize p2m_mem_paging_populate, Xen patchbot-unstable <=