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

[Xen-changelog] [xen-unstable] xenpaging: convert xenpaging_victim_t to struct victim



# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1326125241 -3600
# Node ID 47ca45c8b318d37bb8412ce3d96cf7a37dcce743
# Parent  a2ed45b6df07556647b7dfd86b81dc2fd1324ed6
xenpaging: convert xenpaging_victim_t to struct victim

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
---


diff -r a2ed45b6df07 -r 47ca45c8b318 tools/xenpaging/policy.h
--- a/tools/xenpaging/policy.h  Tue Jan 10 16:24:50 2012 +0000
+++ b/tools/xenpaging/policy.h  Mon Jan 09 17:07:21 2012 +0100
@@ -29,7 +29,7 @@
 
 
 int policy_init(xenpaging_t *paging);
-int policy_choose_victim(xenpaging_t *paging, xenpaging_victim_t *victim);
+int policy_choose_victim(xenpaging_t *paging, struct victim *victim);
 void policy_notify_paged_out(unsigned long gfn);
 void policy_notify_paged_in(unsigned long gfn);
 void policy_notify_paged_in_nomru(unsigned long gfn);
diff -r a2ed45b6df07 -r 47ca45c8b318 tools/xenpaging/policy_default.c
--- a/tools/xenpaging/policy_default.c  Tue Jan 10 16:24:50 2012 +0000
+++ b/tools/xenpaging/policy_default.c  Mon Jan 09 17:07:21 2012 +0100
@@ -77,7 +77,7 @@
     return rc;
 }
 
-int policy_choose_victim(xenpaging_t *paging, xenpaging_victim_t *victim)
+int policy_choose_victim(xenpaging_t *paging, struct victim *victim)
 {
     xc_interface *xch = paging->xc_handle;
     unsigned long wrap = current_gfn;
diff -r a2ed45b6df07 -r 47ca45c8b318 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c       Tue Jan 10 16:24:50 2012 +0000
+++ b/tools/xenpaging/xenpaging.c       Mon Jan 09 17:07:21 2012 +0100
@@ -561,8 +561,7 @@
     RING_PUSH_RESPONSES(back_ring);
 }
 
-static int xenpaging_evict_page(xenpaging_t *paging,
-                         xenpaging_victim_t *victim, int fd, int i)
+static int xenpaging_evict_page(xenpaging_t *paging, struct victim *victim, 
int fd, int i)
 {
     xc_interface *xch = paging->xc_handle;
     void *page;
@@ -711,8 +710,7 @@
         page_in_trigger();
 }
 
-static int evict_victim(xenpaging_t *paging,
-                        xenpaging_victim_t *victim, int fd, int i)
+static int evict_victim(xenpaging_t *paging, struct victim *victim, int fd, 
int i)
 {
     xc_interface *xch = paging->xc_handle;
     int j = 0;
@@ -755,7 +753,7 @@
 }
 
 /* Evict a batch of pages and write them to a free slot in the paging file */
-static int evict_pages(xenpaging_t *paging, int fd, xenpaging_victim_t 
*victims, int num_pages)
+static int evict_pages(xenpaging_t *paging, int fd, struct victim *victims, 
int num_pages)
 {
     xc_interface *xch = paging->xc_handle;
     int rc, slot, num = 0;
@@ -782,7 +780,7 @@
 {
     struct sigaction act;
     xenpaging_t *paging;
-    xenpaging_victim_t *victims;
+    struct victim *victims;
     mem_event_request_t req;
     mem_event_response_t rsp;
     int num, prev_num = 0;
@@ -816,7 +814,7 @@
     }
 
     /* Allocate upper limit of pages to allow growing and shrinking */
-    victims = calloc(paging->max_pages, sizeof(xenpaging_victim_t));
+    victims = calloc(paging->max_pages, sizeof(struct victim));
     if ( !victims )
         goto out;
 
diff -r a2ed45b6df07 -r 47ca45c8b318 tools/xenpaging/xenpaging.h
--- a/tools/xenpaging/xenpaging.h       Tue Jan 10 16:24:50 2012 +0000
+++ b/tools/xenpaging/xenpaging.h       Mon Jan 09 17:07:21 2012 +0100
@@ -57,10 +57,10 @@
 } xenpaging_t;
 
 
-typedef struct xenpaging_victim {
+struct victim {
     /* the gfn of the page to evict */
     unsigned long gfn;
-} xenpaging_victim_t;
+};
 
 
 extern void create_page_in_thread(xenpaging_t *paging);

_______________________________________________
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®.