From: George Dunlap Subject: [PATCH 16 of 16] credit2: On debug keypress print load average as a fraction Date: Thu, 23 Dec 2010 12:38:48 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: george.dunlap@eu.citrix.com List-Id: xen-devel@lists.xenproject.org Signed-off-by: George Dunlap 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<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! */