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

[Xen-changelog] [xen-unstable] xenpaging: improve mainloop exit handling



# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1321804959 -3600
# Node ID b531f5ceddf0fb291ffb23ccbaaa433207f45f80
# Parent  4fe585c2a3e591e031d4ebb9210fd0bfee7a92ca
xenpaging: improve mainloop exit handling

Remove the if/else logic to exit from the in case a signal arrives.
Update comments.

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


diff -r 4fe585c2a3e5 -r b531f5ceddf0 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c       Sun Nov 20 17:02:39 2011 +0100
+++ b/tools/xenpaging/xenpaging.c       Sun Nov 20 17:02:39 2011 +0100
@@ -805,7 +805,7 @@
             }
         }
 
-        /* Write all pages back into the guest */
+        /* If interrupted, write all pages back into the guest */
         if ( interrupted == SIGTERM || interrupted == SIGINT )
         {
             /* If no more pages to process, exit loop. */
@@ -814,13 +814,15 @@
             
             /* One more round if there are still pages to process. */
             resume_pages(paging, paging->num_paged_out);
+
+            /* Resume main loop */
+            continue;
         }
-        else
-        {
-            /* Exit on any other signal */
-            if ( interrupted )
-                break;
-        }
+
+        /* Exit main loop on any other signal */
+        if ( interrupted )
+            break;
+
     }
     DPRINTF("xenpaging got signal %d\n", interrupted);
 

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