From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: [PATCH] All domains (including dom0) should be best effort upon creation. Date: Fri, 16 Dec 2011 17:29:25 +0100 Message-ID: <1324052965.2599.8.camel@Solace> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3355710950159450660==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: George Dunlap , Ian Jackson , Keir Fraser , Ian Campbell List-Id: xen-devel@lists.xenproject.org --===============3355710950159450660== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-uJD1GS+5VhIzwMREW8iI" --=-uJD1GS+5VhIzwMREW8iI Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable All domains (including dom0) should be best effort upon 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 diff -r 01c8b27e3d7d xen/common/sched_sedf.c --- a/xen/common/sched_sedf.c Thu Dec 15 16:56:21 2011 +0000 +++ b/xen/common/sched_sedf.c Fri Dec 16 16:05:37 2011 +0100 @@ -359,19 +359,9 @@ static void *sedf_alloc_vdata(const stru inf->latency =3D 0; inf->status =3D EXTRA_AWARE | SEDF_ASLEEP; inf->extraweight =3D 1; - - if ( v->domain->domain_id =3D=3D 0 ) - { - /* Domain0 gets 75% guaranteed (15ms every 20ms). */ - inf->period =3D MILLISECS(20); - inf->slice =3D MILLISECS(15); - } - else - { - /* Best-effort extratime only. */ - inf->period =3D WEIGHT_PERIOD; - inf->slice =3D 0; - } + /* Upon creation all domain are best-effort. */ + inf->period =3D WEIGHT_PERIOD; + inf->slice =3D 0; =20 inf->period_orig =3D inf->period; inf->slice_orig =3D inf->slice; INIT_LIST_HEAD(&(inf->list)); --=20 <> (Raistlin Majere) ------------------------------------------------------------------- Dario Faggioli, http://retis.sssup.it/people/faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) PhD Candidate, ReTiS Lab, Scuola Superiore Sant'Anna, Pisa (Italy) --=-uJD1GS+5VhIzwMREW8iI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAk7rceYACgkQk4XaBE3IOsRP1gCeM5+T+ybLRSO09Z8wWh335A78 e7sAoJyRdI92fEpDJeAWVmdz1fozEGzY =aWx9 -----END PGP SIGNATURE----- --=-uJD1GS+5VhIzwMREW8iI-- --===============3355710950159450660== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============3355710950159450660==--