Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2
xen
23582-xenpaging_drop_xc.c_move_xc_mem_paging_fl...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 23582-xenpaging_drop_xc.c_move_xc_mem_paging_flush_ioemu_cache.patch of Package xen
changeset: 23582:480e548fe76b user: Olaf Hering <olaf@aepfle.de> date: Fri Jun 10 10:47:10 2011 +0200 files: tools/xenpaging/xc.c tools/xenpaging/xc.h tools/xenpaging/xenpaging.c description: xenpaging: drop xc.c, move xc_mem_paging_flush_ioemu_cache Move xc_mem_paging_flush_ioemu_cache() into xenpaging and massage it a bit to use the required members from xenpaging_t. Also update type of rc to match xs_write() return value. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com> --- tools/xenpaging/xc.c | 18 ------------------ tools/xenpaging/xc.h | 1 - tools/xenpaging/xenpaging.c | 16 +++++++++++++++- 3 files changed, 15 insertions(+), 20 deletions(-) Index: xen-4.1.2-testing/tools/xenpaging/xc.c =================================================================== --- xen-4.1.2-testing.orig/tools/xenpaging/xc.c +++ xen-4.1.2-testing/tools/xenpaging/xc.c @@ -31,24 +31,6 @@ -int xc_mem_paging_flush_ioemu_cache(domid_t domain_id) -{ - struct xs_handle *xsh = NULL; - char path[80]; - int rc; - - sprintf(path, "/local/domain/0/device-model/%u/command", domain_id); - - xsh = xs_daemon_open(); - if ( xsh == NULL ) - return -EIO; - - rc = xs_write(xsh, XBT_NULL, path, "flush-cache", strlen("flush-cache")); - - xs_daemon_close(xsh); - - return rc ? 0 : -1; -} int xc_wait_for_event_or_timeout(xc_interface *xch, xc_evtchn *xce, unsigned long ms) { Index: xen-4.1.2-testing/tools/xenpaging/xc.h =================================================================== --- xen-4.1.2-testing.orig/tools/xenpaging/xc.h +++ xen-4.1.2-testing/tools/xenpaging/xc.h @@ -37,7 +37,6 @@ -int xc_mem_paging_flush_ioemu_cache(domid_t domain_id); int xc_wait_for_event_or_timeout(xc_interface *xch, xc_evtchn *xce, unsigned long ms); Index: xen-4.1.2-testing/tools/xenpaging/xenpaging.c =================================================================== --- xen-4.1.2-testing.orig/tools/xenpaging/xenpaging.c +++ xen-4.1.2-testing/tools/xenpaging/xenpaging.c @@ -48,6 +48,20 @@ static void close_handler(int sig) unlink(filename); } +static int xenpaging_mem_paging_flush_ioemu_cache(xenpaging_t *paging) +{ + struct xs_handle *xsh = paging->xs_handle; + domid_t domain_id = paging->mem_event.domain_id; + char path[80]; + bool rc; + + sprintf(path, "/local/domain/0/device-model/%u/command", domain_id); + + rc = xs_write(xsh, XBT_NULL, path, "flush-cache", strlen("flush-cache")); + + return rc == true ? 0 : -1; +} + static void *init_page(void) { void *buffer; @@ -484,7 +498,7 @@ static int evict_victim(xenpaging_t *pag else { if ( j++ % 1000 == 0 ) - if ( xc_mem_paging_flush_ioemu_cache(paging->mem_event.domain_id) ) + if ( xenpaging_mem_paging_flush_ioemu_cache(paging) ) ERROR("Error flushing ioemu cache"); } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor