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

[Xen-changelog] [xen-unstable] All domains (including dom0) should be best effort on creation



# HG changeset patch
# User Dario Faggioli <dario.faggioli@xxxxxxxxxx>
# Date 1325693506 0
# Node ID d82be53b3ea1db2f9810eeadc2f5bfe80b910b5f
# Parent  50117a4d1a2c715b3da8b196c6e02b16d7a546d7
All domains (including dom0) should be best effort on creation

In the sedf scheduler, while trying to guarantee to dom0 the proper
amount of CPU time for being able to do its job, we end up allocating
75% CPU-share to each and every of its VCPUs. This, combined with the
fact that such a scheduler has no load balancing logic at all (and
thus *all* dom0's VCPUs just rise and stay on physical CPU #0), means
that for example on a 12-cores system we're trying to exploit
75x12=3D900% of what we have on a PCPU, which is definitely too much!

Moreover, even if a cleverer mechanism for distributing VCPUs among
the available PCPUs (if not a proper load balancer) will be put in
place some day, it will still be difficult to decide how much
guaranteed CPU bandwidth each of the dom0's VCPUs should be provided
with, without posing the system at risk of livelock or starvation,
even during boot time.

Therefore, since sedf is capable of some form of best-effort
scheduling, the best thing we can do is ask for this behaviour for
dom0, as it is for all other domains, right upon creation. It will
then be the sysadmin's job to modify dom0's scheduling parameters to
better fit his particular needs, maybe after spreading the load a bit
by pinning VCPUs on PCPUs, or using cpupools, etc.

Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
Acked-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 50117a4d1a2c -r d82be53b3ea1 xen/common/sched_sedf.c
--- a/xen/common/sched_sedf.c   Mon Jan 02 12:43:07 2012 +0000
+++ b/xen/common/sched_sedf.c   Wed Jan 04 16:11:46 2012 +0000
@@ -359,19 +359,9 @@
     inf->latency     = 0;
     inf->status      = EXTRA_AWARE | SEDF_ASLEEP;
     inf->extraweight = 1;
-
-    if ( v->domain->domain_id == 0 )
-    {
-        /* Domain0 gets 75% guaranteed (15ms every 20ms). */
-        inf->period    = MILLISECS(20);
-        inf->slice     = MILLISECS(15);
-    }
-    else
-    {
-        /* Best-effort extratime only. */
-        inf->period    = WEIGHT_PERIOD;
-        inf->slice     = 0;
-    }
+    /* Upon creation all domain are best-effort. */
+    inf->period      = WEIGHT_PERIOD;
+    inf->slice       = 0;
 
     inf->period_orig = inf->period; inf->slice_orig = inf->slice;
     INIT_LIST_HEAD(&(inf->list));

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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