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 16 of 16] credit2: On debug keypress print load avera

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 16 of 16] credit2: On debug keypress print load average as a fraction
From: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Date: Thu, 23 Dec 2010 12:38:48 +0000
Cc: george.dunlap@xxxxxxxxxxxxx
Delivery-date: Thu, 23 Dec 2010 04:55:38 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1293107912@xxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <patchbomb.1293107912@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.3
Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>

diff -r 975588ecb94e -r feda9b7cd63a xen/common/sched_credit2.c
--- a/xen/common/sched_credit2.c        Thu Dec 23 12:27:27 2010 +0000
+++ b/xen/common/sched_credit2.c        Thu Dec 23 12:27:41 2010 +0000
@@ -1774,14 +1774,20 @@
            CSCHED_DEFAULT_WEIGHT);
     for_each_cpu_mask(i, prv->active_queues)
     {
+        s_time_t fraction;
+        
+        fraction = prv->rqd[i].avgload * 100 / (1ULL<<prv->load_window_shift);
+
         printk("Runqueue %d:\n"
                "\tncpus              = %u\n"
                "\tmax_weight         = %d\n"
-               "\tload               = %d\n",
+               "\tinstload           = %d\n"
+               "\taveload            = %3ld\n",
                i,
                cpus_weight(prv->rqd[i].active),
                prv->rqd[i].max_weight,
-               prv->rqd[i].load);
+               prv->rqd[i].load,
+               fraction);
 
     }
     /* FIXME: Locking! */

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