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

[Xen-devel] [PATCH 8 of 9] xenpaging: compare both token and path when checking for @releaseDomain event


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Thu, 15 Sep 2011 08:16:36 +0200
  • Delivery-date: Wed, 14 Sep 2011 23:22:36 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1316067234 -7200
# Node ID 1addb9e81178ea164ef516f340df2607fddcb930
# Parent  6987aa2dde4e93481f1599735ed1a26defb6d6b9
xenpaging: compare both token and path when checking for @releaseDomain event

Subsequent patches will use xenstored to store the numbers of pages
xenpaging is suppose to page-out. A domain_id value could be
misinterpreted as number of pages. Compare both path and token to
recognize the @releaseDomain event.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r 6987aa2dde4e -r 1addb9e81178 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c
+++ b/tools/xenpaging/xenpaging.c
@@ -101,7 +101,7 @@ static int xenpaging_wait_for_event_or_t
         vec = xs_read_watch(paging->xs_handle, &num);
         if ( vec )
         {
-            if ( strcmp(vec[XS_WATCH_TOKEN], watch_token) == 0 )
+            if ( strcmp(vec[XS_WATCH_PATH], "@releaseDomain") == 0 && 
strcmp(vec[XS_WATCH_TOKEN], watch_token) == 0 )
             {
                 /* If our guest disappeared, set interrupt flag and fall 
through */
                 if ( xs_is_domain_introduced(paging->xs_handle, 
paging->mem_event.domain_id) == false )

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


 


Rackspace

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