aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/sched.h
diff options
context:
space:
mode:
authorGeorge Dunlap <george.dunlap@eu.citrix.com>2013-03-11 09:57:11 +0100
committerJan Beulich <jbeulich@suse.com>2013-03-11 09:57:11 +0100
commit4e98fd591232d33b1a3785fe1e5e1361955d9d90 (patch)
tree43dd953fd16f3147ba0cc7eccbaddeae8cd30e62 /xen/include/xen/sched.h
parent582ea94410cb266bbf3cd308046f5ea8ae25055f (diff)
downloadxen-4e98fd591232d33b1a3785fe1e5e1361955d9d90.tar.gz
xen-4e98fd591232d33b1a3785fe1e5e1361955d9d90.tar.bz2
xen-4e98fd591232d33b1a3785fe1e5e1361955d9d90.zip
credit2: Reset until the front of the runqueue is positive
Under normal circumstances, snext->credit should never be less than -CSCHED_MIN_TIMER. However, under some circumstances, a vcpu with low credits may be allowed to run long enough that its credits are actually less than -CSCHED_CREDIT_INIT. (Instances have been observed, for example, where a vcpu with 200us of credit was allowed to run for 11ms, giving it -10.8ms of credit. Thus it was still negative even after the reset.) If this is the case for snext, we simply want to keep moving everyone up until it is in the black again. This fair because none of the other vcpus want to run at the moment. Rather than loop, just detect how many times we want to add CSCHED_CREDIT_INIT. Try to avoid integer divides and multiplies in the common case. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Diffstat (limited to 'xen/include/xen/sched.h')
0 files changed, 0 insertions, 0 deletions