|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1 of 3] xenpaging: convert xenpaging_victim_t to struct victim
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1326125241 -3600
# Node ID dfcef53aa44f76b0dc13fa2acb012f4158da5c7b
# Parent 3a22ed3ec534799b3cab55b0dc0a7380e701ecbe
xenpaging: convert xenpaging_victim_t to struct victim
Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
diff -r 3a22ed3ec534 -r dfcef53aa44f tools/xenpaging/policy.h
--- a/tools/xenpaging/policy.h
+++ b/tools/xenpaging/policy.h
@@ -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 3a22ed3ec534 -r dfcef53aa44f tools/xenpaging/policy_default.c
--- a/tools/xenpaging/policy_default.c
+++ b/tools/xenpaging/policy_default.c
@@ -77,7 +77,7 @@ int policy_init(xenpaging_t *paging)
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 3a22ed3ec534 -r dfcef53aa44f tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c
+++ b/tools/xenpaging/xenpaging.c
@@ -562,8 +562,7 @@ static void put_response(mem_event_t *me
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;
@@ -712,8 +711,7 @@ static void resume_pages(xenpaging_t *pa
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;
@@ -756,7 +754,7 @@ static int evict_victim(xenpaging_t *pag
}
/* 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;
@@ -783,7 +781,7 @@ int main(int argc, char *argv[])
{
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;
@@ -817,7 +815,7 @@ int main(int argc, char *argv[])
}
/* 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 3a22ed3ec534 -r dfcef53aa44f tools/xenpaging/xenpaging.h
--- a/tools/xenpaging/xenpaging.h
+++ b/tools/xenpaging/xenpaging.h
@@ -57,10 +57,10 @@ typedef struct xenpaging {
} 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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |