From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v1 3/4] libxl: enabling XL to set per-VCPU parameters of a domain for RTDS scheduler Date: Sat, 16 May 2015 01:09:59 +0200 Message-ID: <1431731399.2978.193.camel@citrix.com> References: <1431018326-3239-1-git-send-email-chong.li@wustl.edu> <1431018326-3239-4-git-send-email-chong.li@wustl.edu> <1431353193.8979.85.camel@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5421440840938075311==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Chong Li Cc: Chong Li , Wei Liu , Sisu Xi , George Dunlap , xen-devel , Meng Xu , Jan Beulich , Dagaen Golomb List-Id: xen-devel@lists.xenproject.org --===============5421440840938075311== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-m6/BUMNF3Jl3i5wWKKPN" --=-m6/BUMNF3Jl3i5wWKKPN Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2015-05-15 at 10:24 -0500, Chong Li wrote: > On Mon, May 11, 2015 at 9:06 AM, Dario Faggioli > wrote: > > > > On Thu, 2015-05-07 at 12:05 -0500, Chong Li wrote: > > > Change sched_rtds_domain_get/set functions to support per-VCPU settin= gs for RTDS scheduler. > > > >=20 > > > > > + rc =3D xc_domain_getinfo(CTX->xch, domid, 1, &info); > > > + if (rc < 0) { > > > + LOGE(ERROR, "getting domain info"); > > > + return ERROR_FAIL; > > > + } > > > + num_vcpus =3D info.nr_online_vcpus; > > > > > It looks like the most of other places in libxl where this is necessary > > use libxl_list_vcpu(), which, if you want to open code it, uses > > info.max_vcpu_id. I'd do the same. >=20 > Do you mean invoking libxl_list_vcpu() here, or still using > xc_domain_getinfo() (but get the > total number of vcpus by info.max_vcpu_id instead of > info.nr_online_vcpus)? > The latter: use info.max_vcpu_id instead of nr_online_vcpus. I cited libxl_list_vcpu() as an example, to point you an example that does something similar to what you want to do here, i.e., main_vcpupin() in xl_cmdimpl.c, which calls libxl_list_vcpus() to retrieve the maximum number of vcpus, and then uses it... But, really, the point was that you should use the max. In fact, it makes sense to me that the user should be able to set the scheduling parameters of all the vcpus, even the ones that are, at the moment, offlined, don't you think? Regards, Dario --=-m6/BUMNF3Jl3i5wWKKPN 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 iEYEABECAAYFAlVWfMcACgkQk4XaBE3IOsQAUwCfQzJXi4CixMPGtUEvQ8sbku7Z J4AAnAqu47YZpnh2AgJNrk3kupK7Anje =vsAJ -----END PGP SIGNATURE----- --=-m6/BUMNF3Jl3i5wWKKPN-- --===============5421440840938075311== 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 --===============5421440840938075311==--