All of lore.kernel.org
 help / color / mirror / Atom feed
* Question on Credit accounting in Credit Scheduler
@ 2010-07-29 13:21 Thomas Pfeuffer
  2010-07-29 13:35 ` Tim Deegan
  2010-07-29 13:40 ` AW: " Heiko Wundram
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Pfeuffer @ 2010-07-29 13:21 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com

Hello, 

I have looked through the source code of Credit Scheduler. 
 
In csched_acct(), the number of credits a domain gets (i.e credit_fair),
is calculated as follows:

     credit_fair = ( ( credit_total * sdom->weight) + ( weight_total -1)
                  ) / weigth_total

But I would expect, that the Credits are calculated by

     credit_fair = (credit_total * sdom->weight) / weigth_total

Does anybody know, what function the term (weight_total -1) has?


Later, the credits a vcpu gets is calculated by


     credit_fair = ( credit_fair + (sdom->active_vcpu_count -1)
                ) / sdom->active_vcpu_count -1

Again, I would expect that the credits are calculated by

     credit_fair =  credit_fair / sdom->active_vcpu_count


I do not understand why the term (sdom->active_vcpu_count -1 ) is
neccessary.

Best regards, 

Thomas Pfeuffer

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-07-30  6:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-29 13:21 Question on Credit accounting in Credit Scheduler Thomas Pfeuffer
2010-07-29 13:35 ` Tim Deegan
2010-07-29 13:42   ` George Dunlap
2010-07-29 13:40 ` AW: " Heiko Wundram
2010-07-30  6:25   ` Thomas Pfeuffer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.