From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 1/7] xen: sched_rt: avoid ASSERT()ing on runq dump if there are no domains Date: Tue, 17 Mar 2015 11:00:34 +0000 Message-ID: <1426590033.32500.52.camel@citrix.com> References: <20150316165642.10279.86684.stgit@Solace.station> <20150316170450.10279.38060.stgit@Solace.station> <550812D5020000780006AA80@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0915978170763522525==" Return-path: In-Reply-To: <550812D5020000780006AA80@mail.emea.novell.com> Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "JBeulich@suse.com" Cc: "Keir (Xen.org)" , "xumengpanda@gmail.com" , George Dunlap , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org --===============0915978170763522525== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-3hnRGV5NmGpuQq9fNanl" --=-3hnRGV5NmGpuQq9fNanl Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2015-03-17 at 10:41 +0000, Jan Beulich wrote: > >>> On 16.03.15 at 18:04, wrote: > > --- a/xen/common/sched_rt.c > > +++ b/xen/common/sched_rt.c > > @@ -264,18 +264,17 @@ rt_dump(const struct scheduler *ops) > > struct list_head *iter_sdom, *iter_svc, *runq, *depletedq, *iter; > > struct rt_private *prv =3D rt_priv(ops); > > struct rt_vcpu *svc; > > - cpumask_t *online; > > struct rt_dom *sdom; > > unsigned long flags; > > =20 > > - ASSERT(!list_empty(&prv->sdom)); > > + spin_lock_irqsave(&prv->lock, flags); > > + > > + if (list_empty(&prv->sdom)) >=20 > Coding style. >=20 Gah! Sure.... sorry! > > + goto out; > > =20 > > - sdom =3D list_entry(prv->sdom.next, struct rt_dom, sdom_elem); > > - online =3D cpupool_scheduler_cpumask(sdom->dom->cpupool); >=20 > Unrelated change (together with the variable deletion above). I'm > fine for this to stay here, but it should at least be mentioned in the > description so that future archeologists don't wonder about the > connection to the actual issue fixed here. >=20 Ok, I'll update the changelog, including also a mention to the fact that I'm moving up the spinlock acquisition as (I think) George is also suggesting to. > > @@ -303,6 +302,7 @@ rt_dump(const struct scheduler *ops) > > } > > } > > =20 > > +out: >=20 > Labels should be indented by at least one space. >=20 I checked all the sched_* file, and this is rather inconsistent. What I'll do is indent this one appropriately, which will make things even more inconsistent (in sched_rt.c there is only another 'out:' label, and it's not indented), and then send an independent cleanup patch afterwards... hope it is fine. Thanks and Regards, Dario > Jan >=20 >=20 > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel --=-3hnRGV5NmGpuQq9fNanl 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 iEYEABECAAYFAlUICVEACgkQk4XaBE3IOsSFswCginnd8ugRSXX9OhD8oFOkEnmK wLIAoJBvDmr2a2ikR5dsCfPLL+x2l9U+ =8zgL -----END PGP SIGNATURE----- --=-3hnRGV5NmGpuQq9fNanl-- --===============0915978170763522525== 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.xen.org http://lists.xen.org/xen-devel --===============0915978170763522525==--