credit2: On debug keypress print load average as a fraction
authorKeir Fraser <keir@xen.org>
Fri, 24 Dec 2010 08:32:43 +0000 (08:32 +0000)
committerKeir Fraser <keir@xen.org>
Fri, 24 Dec 2010 08:32:43 +0000 (08:32 +0000)
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
xen/common/sched_credit2.c

index f3a7ab1a0572b4b1281d1168dc783db47541787b..916e00bf490c63cd5e566c3a73a6578031c10cb4 100644 (file)
@@ -1774,14 +1774,20 @@ csched_dump(const struct scheduler *ops)
            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! */