From: Thomas Pfeuffer <thomas.pfeuffer@mytum.de>
To: Heiko Wundram <modelnine@modelnine.org>, Tim.Deegan@citrix.com
Cc: dunlapg@umich.edu, xen-devel@lists.xensource.com
Subject: Re: AW: Question on Credit accounting in Credit Scheduler
Date: Fri, 30 Jul 2010 08:25:24 +0200 [thread overview]
Message-ID: <4C527054.1080601@mytum.de> (raw)
In-Reply-To: <014c01cb2f23$9733b420$c59b1c60$@org>
[-- Attachment #1.1: Type: text/plain, Size: 1803 bytes --]
Hello,
thanks for your answer.
Best regards,
Thomas
Heiko Wundram wrote:
>>-----Ursprüngliche Nachricht-----
>>Von: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-
>>bounces@lists.xensource.com] Im Auftrag von Thomas Pfeuffer
>>Gesendet: Donnerstag, 29. Juli 2010 15:21
>>An: xen-devel@lists.xensource.com
>>Betreff: [Xen-devel] Question on Credit accounting in Credit Scheduler
>>
>>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?
>>
>>
>
>Without knowing details of the Xen scheduling algorithm (i.e., I'm guessing
>that the above is integer-only math), all it does is "round up" the (fair)
>credits a domain gets [(x+y-1)/y means division with always rounding up,
>think of the "Gaußklammer", don't know the german name, in reverse];
>basically, if the above calculation is done for all domains, the respective
>sum of all calculated credit_fair will always be equal to or higher than
>credit_total, which wouldn't be the case (because of truncation when just
>doing x/y) when using your function, i.e. the sum of all credit_fair might
>be less than credit_total.
>
>For a scheduling algorithm, you'll want to always give away _at least_ all
>available credits, and this is a simple enough method to do just that
>without resorting to floating point calculations.
>
>--- Heiko.
>
>
>
>
[-- Attachment #1.2: Type: text/html, Size: 2467 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
prev parent reply other threads:[~2010-07-30 6:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C527054.1080601@mytum.de \
--to=thomas.pfeuffer@mytum.de \
--cc=Tim.Deegan@citrix.com \
--cc=dunlapg@umich.edu \
--cc=modelnine@modelnine.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.