From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v2 1/5] xen:rtds: towards work conserving RTDS Date: Thu, 14 Sep 2017 03:06:57 +0200 Message-ID: <1505351217.13935.14.camel@citrix.com> References: <1504281532-3766-1-git-send-email-mengxu@cis.upenn.edu> <1504281532-3766-2-git-send-email-mengxu@cis.upenn.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6614412853100992874==" Return-path: In-Reply-To: <1504281532-3766-2-git-send-email-mengxu@cis.upenn.edu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Meng Xu , xen-devel@lists.xen.org Cc: george.dunlap@eu.citrix.com, xumengpanda@gmail.com, ian.jackson@eu.citrix.com, wei.liu@citrix.com List-Id: xen-devel@lists.xenproject.org --===============6614412853100992874== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-0s8SuL3gQeRupiyobgxj" --=-0s8SuL3gQeRupiyobgxj Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2017-09-01 at 11:58 -0400, Meng Xu wrote: > Make RTDS scheduler work conserving without breaking the real-time > guarantees. >=20 > VCPU model: > Each real-time VCPU is extended to have an extratime flag > and a priority_level field. > When a VCPU's budget is depleted in the current period, > if it has extratime flag set, > its priority_level will increase by 1 and its budget will be > refilled; > othewrise, the VCPU will be moved to the depletedq. >=20 > Scheduling policy is modified global EDF: > A VCPU v1 has higher priority than another VCPU v2 if > (i) v1 has smaller priority_leve; or > (ii) v1 has the same priority_level but has a smaller deadline >=20 > Queue management: > Run queue holds VCPUs with extratime flag set and VCPUs with > remaining budget. Run queue is sorted in increasing order of VCPUs > priorities. > Depleted queue holds VCPUs which have extratime flag cleared and > depleted budget. > Replenished queue is not modified. >=20 Mmm.. didn't we agree about putting a word of explanation of how the spare bandwidth ends up being distributed (i.e., in a way which is proportional to the utilization)? Or is it there and it's me that am not finding it? > --- a/xen/common/sched_rt.c > +++ b/xen/common/sched_rt.c=C2=A0 > @@ -245,6 +258,11 @@ static inline struct list_head *rt_replq(const > struct scheduler *ops) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return &rt_priv(ops)->replq; > =C2=A0} > =C2=A0 > +static inline bool has_extratime(const struct rt_vcpu *svc) > +{ > +=C2=A0=C2=A0=C2=A0=C2=A0return (svc->flags & RTDS_extratime) ? 1 : 0; > +} > + 'true' and 'false'. But I think return svc->flags & RTDS_extratime is just fine already, without any need for the ?: operator. The rest of the patch looks fine to me. Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-0s8SuL3gQeRupiyobgxj 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 v2 iQIcBAABCAAGBQJZudYxAAoJEBZCeImluHPubkMQAK6a3mj6fj+Oo05T8XjzaL9A +Fzq3BUCu/oObU3wuOLzuNl6mqggThMr/0DVTNPcobKAh2hG/FwIDP7/VFIBZeXy YjtyBNA+9fJia+sYObLwd6I6Md8F+eInXI4hJrNRtPNlp99IZQIfZ8GwP9pOSg3P BAQvyp6/1yrAHaj3Bhaos01wwP3KTDbJTkEenTPm7mzOnthumJSJ9gTOQ6IEHT80 5q1i8/CkQ8oO1JYARMYfncN4N/Xz22gAvVCad/AGQeaBwVXnDkafhkNvrPenG//6 ChFl14ZFfgxvvZK9fxQJ2u5xB75BdGLZOf2jVuP7wmXH5Pg/umUsEGo/zOjlfkWI f9LNQCEOqe2zQEEnErmzX82e9x/WZM9BRUsaZhhjP6jfy0juzf88x1DTp96ewIrp T43VbZIZ59gL1zqhIEuRg8KbzZUgcskz0FVl2mDKwivmsLZALQ3wln/5rndj3cGx 2WYsKa+3G7kxGEiXCZi+N833eoWV+4uyJrcs52hEG92HupVXkjSnIlNUWl+zYVhY NUVLXN44yAU8y+T01O9EnaO0yl544loeNLHm42wQKTDAuIbPxI4TgpSYBLqRGb9K eClGyr4aUyl9Q8YToEPAay7p8tP5Tx3Zslrj4EFO+7H04a8FQvbPVU/tdIsiwb9C 9ejnc3v5610NbXax+dXW =+cOV -----END PGP SIGNATURE----- --=-0s8SuL3gQeRupiyobgxj-- --===============6614412853100992874== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============6614412853100992874==--