WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Handle RUNSTATE_INIT in domain_runstate calculation

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Handle RUNSTATE_INIT in domain_runstate calculation
From: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Date: Tue, 5 Jul 2011 12:28:43 +0100
Cc: george.dunlap@xxxxxxxxxxxxx
Delivery-date: Tue, 05 Jul 2011 04:29:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.4.3
diff -r 54ed57e63047 -r 275dd17a6a36 xenalyze.c
--- a/xenalyze.c        Wed May 18 11:24:21 2011 +0200
+++ b/xenalyze.c        Tue Jul 05 12:28:26 2011 +0100
@@ -4832,7 +4832,7 @@ int domain_runstate(struct domain_data *
         runstates[i]=0;
 
     for(i=0; i<=d->max_vid; i++)
-        if(d->vcpu[i]) {
+        if(d->vcpu[i] && d->vcpu[i]->runstate.state != RUNSTATE_INIT) {
             max_vcpus++;
             runstates[d->vcpu[i]->runstate.state]++;
         }
@@ -4863,17 +4863,18 @@ int domain_runstate(struct domain_data *
                 d->did);
     }
 
-#if 0
-    printf(" Max vid: %d\n", d->max_vid);
-    for(i=0; i<=d->max_vid; i++)
-        if(d->vcpu[i])
-            fprintf(warn, " v%d: %s\n",
-                    i, runstate_name[d->vcpu[i]->runstate]);
-
-    for(i=0; i<RUNSTATE_MAX; i++)
-        fprintf(warn, " %s: %d\n",
-                runstate_name[i], runstates[i]);
-#endif     
+    if ( ret < 0 )
+    {
+        printf(" Max vid: %d (max_vcpus %d)\n", d->max_vid, max_vcpus);
+        for(i=0; i<=d->max_vid; i++)
+            if(d->vcpu[i])
+                fprintf(warn, " v%d: %s\n",
+                        i, runstate_name[d->vcpu[i]->runstate.state]);
+
+        for(i=0; i<RUNSTATE_MAX; i++)
+            fprintf(warn, " %s: %d\n",
+                    runstate_name[i], runstates[i]);
+    }
                    
     if(ret >= 0)
         return ret;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Handle RUNSTATE_INIT in domain_runstate calculation, George Dunlap <=