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

Re: [Xen-devel] [RFC] [PATCH] Accurate accounting for credit scheduler

To: "George Dunlap" <George.Dunlap@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [RFC] [PATCH] Accurate accounting for credit scheduler
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Tue, 25 Aug 2009 15:48:09 +0100
Cc: Steven Hand <Steven.Hand@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Tue, 25 Aug 2009 07:48:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <de76405a0908250723s185c16a9tb5875b1c2641fba5@xxxxxxxxxxxxxx>
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: <de76405a0908250723s185c16a9tb5875b1c2641fba5@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> George Dunlap <George.Dunlap@xxxxxxxxxxxxx> 25.08.09 16:23 >>>
>--- a/xen/common/sched_credit.c        Mon Aug 24 08:27:30 2009 +0100
>+++ b/xen/common/sched_credit.c        Mon Aug 24 21:39:35 2009 +0100
>@@ -44,11 +44,12 @@
> #define CSCHED_MSECS_PER_TICK       10
> #define CSCHED_MSECS_PER_TSLICE     \
>     (CSCHED_MSECS_PER_TICK * CSCHED_TICKS_PER_TSLICE)
>-#define CSCHED_CREDITS_PER_TICK     100
>+#define CSCHED_CREDITS_PER_MSEC    100000
> #define CSCHED_CREDITS_PER_TSLICE   \
>-    (CSCHED_CREDITS_PER_TICK * CSCHED_TICKS_PER_TSLICE)
>+    (CSCHED_MSECS_PER_TSLICE * CSCHED_CREDITS_PER_MSEC)
> #define CSCHED_CREDITS_PER_ACCT     \
>-    (CSCHED_CREDITS_PER_TICK * CSCHED_TICKS_PER_ACCT)
>+    (CSCHED_CREDITS_PER_MSEC * CSCHED_MSECS_PER_TSLICE)

This effectively makes an assumption that CSCHED_TICKS_PER_ACCT ==
CSCHED_TICKS_PER_TSLICE, which I don't think the rest of the code
really intends (or if it does, distinguishing those two as well as
CSCHED_CREDITS_PER_TSLICE and CSCHED_CREDITS_PER_ACCT would
become pointless).

>+#define CSCHED_STIME_TO_CREDIT(_t)  
>((_t)*CSCHED_CREDITS_PER_MSEC/MILLISECS(1))
> 
> 
> /*

Jan


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

<Prev in Thread] Current Thread [Next in Thread>