[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



>>> 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.