[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86/mm: Allow dummy responses on the mem_event ring.



# HG changeset patch
# User Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
# Date 1323202232 0
# Node ID 534b2a15e6695dfd8866c0ff626b002cbf57991a
# Parent  c65d1a9769b4140ea35faf27b070a75767b38db4
x86/mm: Allow dummy responses on the mem_event ring.

Ring semantics require that for every request, a response be put. This
allows consumer to place a dummy response if need be.

Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
Signed-off-by: Tim Deegan <tim@xxxxxxx>
Committed-by: Tim Deegan <tim@xxxxxxx>
---


diff -r c65d1a9769b4 -r 534b2a15e669 xen/arch/x86/mm/mem_sharing.c
--- a/xen/arch/x86/mm/mem_sharing.c     Tue Dec 06 20:10:32 2011 +0000
+++ b/xen/arch/x86/mm/mem_sharing.c     Tue Dec 06 20:10:32 2011 +0000
@@ -303,6 +303,8 @@
     /* Get all requests off the ring */
     while ( mem_event_get_response(&d->mem_event->share, &rsp) )
     {
+        if ( rsp.flags & MEM_EVENT_FLAG_DUMMY )
+            continue;
         /* Unpause domain/vcpu */
         if ( rsp.flags & MEM_EVENT_FLAG_VCPU_PAUSED )
             vcpu_unpause(d->vcpu[rsp.vcpu_id]);
diff -r c65d1a9769b4 -r 534b2a15e669 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c     Tue Dec 06 20:10:32 2011 +0000
+++ b/xen/arch/x86/mm/p2m.c     Tue Dec 06 20:10:32 2011 +0000
@@ -1056,6 +1056,8 @@
     /* Pull all responses off the ring */
     while( mem_event_get_response(&d->mem_event->paging, &rsp) )
     {
+        if ( rsp.flags & MEM_EVENT_FLAG_DUMMY )
+            continue;
         /* Fix p2m entry if the page was not dropped */
         if ( !(rsp.flags & MEM_EVENT_FLAG_DROP_PAGE) )
         {
@@ -1164,6 +1166,8 @@
     /* Pull all responses off the ring */
     while( mem_event_get_response(&d->mem_event->access, &rsp) )
     {
+        if ( rsp.flags & MEM_EVENT_FLAG_DUMMY )
+            continue;
         /* Unpause domain */
         if ( rsp.flags & MEM_EVENT_FLAG_VCPU_PAUSED )
             vcpu_unpause(d->vcpu[rsp.vcpu_id]);
diff -r c65d1a9769b4 -r 534b2a15e669 xen/include/public/mem_event.h
--- a/xen/include/public/mem_event.h    Tue Dec 06 20:10:32 2011 +0000
+++ b/xen/include/public/mem_event.h    Tue Dec 06 20:10:32 2011 +0000
@@ -40,6 +40,7 @@
 #define MEM_EVENT_FLAG_DROP_PAGE    (1 << 1)
 #define MEM_EVENT_FLAG_EVICT_FAIL   (1 << 2)
 #define MEM_EVENT_FLAG_FOREIGN      (1 << 3)
+#define MEM_EVENT_FLAG_DUMMY        (1 << 4)
 
 /* Reasons for the memory event request */
 #define MEM_EVENT_REASON_UNKNOWN     0    /* typical reason */

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.