From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v6 for Xen 4.7 1/4] xen: enable per-VCPU parameter settings for RTDS scheduler Date: Wed, 9 Mar 2016 17:10:04 +0100 Message-ID: <1457539804.3102.425.camel@citrix.com> References: <1457286958-5427-1-git-send-email-lichong659@gmail.com> <1457286958-5427-2-git-send-email-lichong659@gmail.com> <20160308190950.GT31271@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4488955646673875987==" Return-path: In-Reply-To: <20160308190950.GT31271@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Wei Liu , Chong Li Cc: Chong Li , Sisu Xi , george.dunlap@eu.citrix.com, xen-devel@lists.xen.org, Meng Xu , jbeulich@suse.com, dgolomb@seas.upenn.edu List-Id: xen-devel@lists.xenproject.org --===============4488955646673875987== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-f+qT/mGilNX/maAWIZtm" --=-f+qT/mGilNX/maAWIZtm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2016-03-08 at 19:09 +0000, Wei Liu wrote: > On Sun, Mar 06, 2016 at 11:55:55AM -0600, Chong Li wrote: >=C2=A0 > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0spin_lock_irqsave(&prv->lock, flags); > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0svc =3D rt_vcpu(d->vcpu[local_sched.vcpuid]); > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0svc->period =3D period; > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0svc->budget =3D budget; > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0spin_unlock_irqrestore(&prv->lock, flags); > > + > And this locking pattern seems sub-optimal. You might be able to move > the lock and unlock outside the while loop? >=20 Yes, unless I'm missing something, that looks possible to me, and would save a lot of acquire/release ping pong on the lock. And yet, I'm not sure doing (for large guests) batches of 64 iterations with (as of now) interrupts disabled. I'll think about this... Thanks and Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-f+qT/mGilNX/maAWIZtm 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 iEYEABECAAYFAlbgStwACgkQk4XaBE3IOsSYzQCfU3Uf4novnXgZqzRqEFohv73Q pcUAoJbTyVc33ru7pI3l60g6WFVbXmFz =vEub -----END PGP SIGNATURE----- --=-f+qT/mGilNX/maAWIZtm-- --===============4488955646673875987== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============4488955646673875987==--