From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v3 1/4] xen: add real time scheduler rtds Date: Fri, 19 Sep 2014 11:45:04 +0200 Message-ID: <1411119904.2232.6.camel@Abyss> References: <1410730649-2417-1-git-send-email-mengxu@cis.upenn.edu> <1410730649-2417-2-git-send-email-mengxu@cis.upenn.edu> <541B038D.4030307@eu.citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2459784688757826258==" Return-path: In-Reply-To: <541B038D.4030307@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: ian.campbell@citrix.com, xisisu@gmail.com, stefano.stabellini@eu.citrix.com, lu@cse.wustl.edu, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, ptxlinh@gmail.com, xumengpanda@gmail.com, Meng Xu , JBeulich@suse.com, chaowang@wustl.edu, lichong659@gmail.com, dgolomb@seas.upenn.edu List-Id: xen-devel@lists.xenproject.org --===============2459784688757826258== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-P2iaxt7lK65sGdCR9ZI1" --=-P2iaxt7lK65sGdCR9ZI1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2014-09-18 at 17:08 +0100, George Dunlap wrote: > On 09/14/2014 10:37 PM, Meng Xu wrote: > +static void > +rt_dump_pcpu(const struct scheduler *ops, int cpu) > +{ > + struct rt_vcpu *svc =3D rt_vcpu(curr_on_cpu(cpu)); > + > + rt_dump_vcpu(ops, svc); > +} >=20 >=20 > These svc structures are allocated dynamically and may disappear at any= =20 > time... I think you need the lock to cover this as well. >=20 About locking, I agree with George that we need these functions to be protected. Right now, this scheduler only uses one lock for everything, so that would mean grabbing that lock here too. This far from optimal, e.g., with scalability in mind (although, dumping is going to be pretty rare an operation), but I think it'd be fine for now. In future (after 4.5), we may want to have a dedicated lock for all the operations that manipulates the list of domains, as pretty much all our other schedulers are doing. Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-P2iaxt7lK65sGdCR9ZI1 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 iEYEABECAAYFAlQb+yAACgkQk4XaBE3IOsSwzQCglTYCv4CNva30i62/GXyUz8zP GbcAoJPZikQS6YusKzuFhFoA98kmy0R1 =YaG5 -----END PGP SIGNATURE----- --=-P2iaxt7lK65sGdCR9ZI1-- --===============2459784688757826258== 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 --===============2459784688757826258==--