|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] Credit1: Tweak reset condition
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1281368253 -3600
# Node ID 2129cabe5f3322324587e4d640e27179960717d9
# Parent fc29e13f669df8a78e9bcd35de56ca07e1c6a637
Credit1: Tweak reset condition
VMs that don't use their full timeslice are guaranteed to flip back
and forth between "active" and "inactive". If we set credit to 0
when setting "inactive", then when the VM comes back to "active"
again, it will effectively be behind most other vcpus in credit.
This causes the credit1 to effectively discriminate *against*
VMs which use less than their full timeslice.
Instead of setting credit to 0, divide it in half. This gets rid of
some of the system credit while allowing non-cpu-bound VMs to keep
some priority advantage.
Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---
xen/common/sched_credit.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
diff -r fc29e13f669d -r 2129cabe5f33 xen/common/sched_credit.c
--- a/xen/common/sched_credit.c Mon Aug 09 16:36:07 2010 +0100
+++ b/xen/common/sched_credit.c Mon Aug 09 16:37:33 2010 +0100
@@ -1100,7 +1100,9 @@ csched_acct(void* dummy)
if ( credit > CSCHED_CREDITS_PER_TSLICE )
{
__csched_vcpu_acct_stop_locked(prv, svc);
- credit = 0;
+ /* Divide credits in half, so that when it starts
+ * accounting again, it starts a little bit "ahead" */
+ credit /= 2;
atomic_set(&svc->credit, credit);
}
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] Credit1: Tweak reset condition,
Xen patchbot-unstable <=
|
|
|
|
|