From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: RT-Xen on ARM Date: Thu, 28 Sep 2017 18:01:18 +0200 Message-ID: <1506614478.5001.12.camel@citrix.com> References: <264a731d-bebe-91b5-dc92-3eb0f020c526@epam.com> <2c5c6fba-fdcf-f12d-2d8f-07ae970b9408@epam.com> <20e4bb06-ae29-266c-2d09-83cee826a29d@epam.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0623762055829181389==" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxbFq-00063L-Ng for xen-devel@lists.xenproject.org; Thu, 28 Sep 2017 16:01:38 +0000 In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Andrii Anisov , Meng Xu Cc: xen-devel List-Id: xen-devel@lists.xenproject.org --===============0623762055829181389== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-/qEJXT5Si52JFAtfjnKd" --=-/qEJXT5Si52JFAtfjnKd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2017-09-28 at 12:18 +0300, Andrii Anisov wrote: > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0- Could you please provide an example i= nput xml for CARTS > > > described a > > > system with 2 RT domains with 2 VCPUs each, running on a 2PCPUs, > > > with gEDF > > > scheduling at VMM level (for XEN based setup). > >=20 > > Hmm, if you use the gEDF scheduling algorithm, this may not be > > possible. Let me explain why. > > In the MPR2 model, it computes the interface with the minimum > > number > > of cores. To get 2 VCPUs for a VM, the total utilization (i.e., > > budget > > / period) of these two VCPUs must be larger than 1.0. Since you ask > > for 2 domains, the total utilization of these 4 VCPUs will be > > larger > > than 2.0, which are definitely not schedulable on two cores. >=20 > Well, if we are speaking about test-cases similar to described in > [1],=C2=A0 > Missing the link? > where the whole real time tasks set utilization is taken from=C2=A0 > 1.1...(PCPU*1)-0.1, there is no problem with having VCPU number > greater=C2=A0 > than PCPUs. For sure if we take number of domains=C2=A0=C2=A0more that 1. >=20 I may miss/have misunderstood some of the background information, but anyway. Also, I've been exposed to the supply/demand concepts that are the basis of Meng's CARTS tool, during my PhD on this things, but it's been a while, so bear with me. Point is, if you have 4 vCPUs in total (2 domains with 2 each), and 2 pCPUs, they can't run all the time all together. The choices are between a general purpose scheduler, or an RT one. The GP scheduler --like Credit1 or Credit2, if you are on Xen-- will give you fairness, but without any precise temporal guarantee. This means that, in this case, each vCPU will be given the chance to run for 1/2 CPU capacity (at there are 2 CPUs, 4 vCPUs total, i.e., 2/4=3D1/2). You can influence this with weights, but that's still "not real-time". I.e., if you say that d1v0 and d1v1 have double the weights of d2v0 and d2v1, if 2 is the total available CPU capacity, d1's vCPUs will run for Now, let's say that, in d1, there is a critical real-time application that absolutely needs to read the status of a sensor every 10ms. Is there a set of weights able to provide you with the guarantee that it will always be able to, whatever it is that the other vCPUs are doing? Well, no, there isn't. And this is where RTDS becomes interesting. So, is there a way to tell to RTDS that you want to be sure that d1 will have a chance to run every 10ms? Yes, there is: you give to it a period of 10ms. Now you need to esteem how much computation time d1's vCPUs require (for reading that sensors, but, let's say, also for doing other stuff, since it's a 2 vCPUs VM). Let's assume that you're quite confident that it will be enough to giving 20% overall capacity to each vCPU. This means budget for d1v0 and d1v1 will be 2ms (as 2/10*100=3D20). Now, there is another domain, and it may host applications with real- time requirements as well, here's where things become interesting. According to what I remember from SMP real-time scheduling theory, you just can't assume that giving d2v0 and d2v1 budget and period of 80ms and 100ms, respectively, will result in a schedulable system, even though you have 2 CPUs, and 2/10+2/10+80/100+80/100=3D2 (for Meng, I'm talking in general, about the fact that, under gEDF, with M CPUs, U> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-/qEJXT5Si52JFAtfjnKd 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 iQIcBAABCAAGBQJZzRzOAAoJEBZCeImluHPuiTgP/RRgdHb7gqSzc2jyOINfxDoL nGICopAaWDKpFZu3iPUd2BBvg9PsXKkZtXFfAF22qTYv5pQK9ah/tANxTncAR+4X 11A0xS6GJbnF8Cw4iBlB1jF0Ge+5ppmZ9j7DvGmNVyFDQBVDi5NiSXpLZXb2hmVo wUA3YXB4tZTw3Dn9ZLj3KjekN5ZD5GFENE5mHq5an3/teuNdaomzX9zA3Rkz8pin 4MQgqNT+m+vzYBa+HnBumMkWiFM0YSO5WNkx9nJV1+qf0SZ9AietCR043usJKkDD CpGOmjkkt/v70ErBLO84OdQvXKpPfudAUuHFKQKsU675+zYZx4h7W7aiEHMCnWTQ +VoDA8BZ2A9nCS7HqPg1py9be0fJ+YP5xNz1R/ubSlNIiR9d60H608MTPC/OokZH RDx7yy0gwB+hcLywSGEg+YcCWlcb64fWQDYipV5BKb/Ys0V+C3Mw27tsjM0qW2Yx 6JgYum2ArkjPb8HXdzcepr+DLBKeFF8paXPWs5FJ0XEq9ehWi4EDaaykY997woKP Y34hcz0hZdItAAqqCWZK1xBelNYWaZBcVrZml1oadaUMURrVY2fsVBLfBeQoYmTD 9pSa/sCbqEQ/vGK2Lkm5PH5EYHOp+zykLDlU3S4c+6jRjyt64csUyDUj8ee64nqg As5jbT1KBAzdZ8jR81d+ =jfm5 -----END PGP SIGNATURE----- --=-/qEJXT5Si52JFAtfjnKd-- --===============0623762055829181389== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============0623762055829181389==--