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

[Xen-changelog] [xen-unstable] xenpaging: remove obsolete XENMEM_paging_op_resume



# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1330617482 0
# Node ID b11d27240542cc876e6f06d78014eb86d127e158
# Parent  f6ccd81028b7631e53a4f1d929f12f709de2f708
xenpaging: remove obsolete XENMEM_paging_op_resume

With changeset 24364:0964341efd65 an event channel based notification of
new responses in the ringbuffer is implemented. This makes the memevent
interface obsolete. Currently a call to p2m_mem_paging_resume() is
triggered twice by xenpaging, once per memevent and once per even
channel. In practice this double call does not lead to issues because
p2m_mem_paging_resume() processes only available events.

xenpaging used the event channel notification since the beginning, but
it was a no-op until changeset mentioned above. This change removes the
unneeded XENMEM_paging_op_resume functionality. Pagers are notified via
an event channel of new requests, and now they are required to notify
the hypervisor about their responses also with an event channel.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Acked-by: Tim Deegan <tim@xxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r f6ccd81028b7 -r b11d27240542 tools/libxc/xc_mem_paging.c
--- a/tools/libxc/xc_mem_paging.c       Thu Mar 01 15:23:31 2012 +0000
+++ b/tools/libxc/xc_mem_paging.c       Thu Mar 01 15:58:02 2012 +0000
@@ -93,14 +93,6 @@
     return rc;
 }
 
-int xc_mem_paging_resume(xc_interface *xch, domid_t domain_id, unsigned long 
gfn)
-{
-    return xc_mem_event_memop(xch, domain_id,
-                                XENMEM_paging_op_resume,
-                                XENMEM_paging_op,
-                                gfn, NULL);
-}
-
 
 /*
  * Local variables:
diff -r f6ccd81028b7 -r b11d27240542 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h     Thu Mar 01 15:23:31 2012 +0000
+++ b/tools/libxc/xenctrl.h     Thu Mar 01 15:58:02 2012 +0000
@@ -1902,8 +1902,6 @@
 int xc_mem_paging_prep(xc_interface *xch, domid_t domain_id, unsigned long 
gfn);
 int xc_mem_paging_load(xc_interface *xch, domid_t domain_id, 
                         unsigned long gfn, void *buffer);
-int xc_mem_paging_resume(xc_interface *xch, domid_t domain_id,
-                         unsigned long gfn);
 
 int xc_mem_access_enable(xc_interface *xch, domid_t domain_id,
                         void *shared_page, void *ring_page);
diff -r f6ccd81028b7 -r b11d27240542 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c       Thu Mar 01 15:23:31 2012 +0000
+++ b/tools/xenpaging/xenpaging.c       Thu Mar 01 15:58:02 2012 +0000
@@ -656,8 +656,6 @@
 
 static int xenpaging_resume_page(struct xenpaging *paging, 
mem_event_response_t *rsp, int notify_policy)
 {
-    int ret;
-
     /* Put the page info on the ring */
     put_response(&paging->mem_event, rsp);
 
@@ -678,14 +676,7 @@
     }
 
     /* Tell Xen page is ready */
-    ret = xc_mem_paging_resume(paging->xc_handle, paging->mem_event.domain_id,
-                               rsp->gfn);
-    if ( ret == 0 ) 
-        ret = xc_evtchn_notify(paging->mem_event.xce_handle,
-                               paging->mem_event.port);
-
- out:
-    return ret;
+    return xc_evtchn_notify(paging->mem_event.xce_handle, 
paging->mem_event.port);
 }
 
 static int xenpaging_populate_page(struct xenpaging *paging, unsigned long 
gfn, int i)
diff -r f6ccd81028b7 -r b11d27240542 xen/arch/x86/mm/mem_paging.c
--- a/xen/arch/x86/mm/mem_paging.c      Thu Mar 01 15:23:31 2012 +0000
+++ b/xen/arch/x86/mm/mem_paging.c      Thu Mar 01 15:58:02 2012 +0000
@@ -53,13 +53,6 @@
     }
     break;
 
-    case XENMEM_paging_op_resume:
-    {
-        p2m_mem_paging_resume(d);
-        return 0;
-    }
-    break;
-
     default:
         return -ENOSYS;
         break;
diff -r f6ccd81028b7 -r b11d27240542 xen/include/public/memory.h
--- a/xen/include/public/memory.h       Thu Mar 01 15:23:31 2012 +0000
+++ b/xen/include/public/memory.h       Thu Mar 01 15:58:02 2012 +0000
@@ -322,7 +322,6 @@
 #define XENMEM_paging_op_nominate           0
 #define XENMEM_paging_op_evict              1
 #define XENMEM_paging_op_prep               2
-#define XENMEM_paging_op_resume             3
 
 #define XENMEM_access_op                    21
 #define XENMEM_access_op_resume             0

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.