From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: Questions / Comments about hard / soft affinity in Credit 2 Date: Tue, 10 Dec 2013 14:17:58 +0100 Message-ID: <1386681478.5488.18.camel@Solace> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8177354532032270374==" 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: Justin Weaver Cc: george.dunlap@eu.citrix.com, xen-devel@lists.xensource.com, esb@ics.hawaii.edu, Henri Casanova List-Id: xen-devel@lists.xenproject.org --===============8177354532032270374== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-1hjLgyYD1+FCUU5odLNV" --=-1hjLgyYD1+FCUU5odLNV Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable You know that you sent 3 copies of this message in a time span of 20 minutes, don't you? :-) That is not ideal for mailing list like xen-devel (but I think that is valid for mailing lists in general). Anyway... let me sort out a couple of stuff, and then I'll reply to the technical arguments. Dario On lun, 2013-12-09 at 22:08 -1000, Justin Weaver wrote: >=20 > Hello, >=20 > On Sat, Nov 30, 2013 at 10:18 PM, Dario Faggioli > wrote: > I'll have to re-look at the details of credit2 about load > balance and > migration between CPUs/runqueues but it looks like we need to > have > something allowing us to honour pinning/affinity _within_ the > same > runqueue, anyway, don't we? I mean, even if you implement > per-L2 > runqueues, that would still span more than one CPU, and the > user may > well want to pin a vCPU to only one (or in general a subset) > of them. >=20 >=20 > Yes, I agree. Just looking for some feedback before I attempt a patch. > Some of the functions I think need updating for hard/soft affinity... >=20 >=20 > runq_candidate needs to be updated. It decides which vcpu from the run > queue to run next on a given pcpu. Currently it only takes credit into > account. Considering hard affinity should be simple enough. For soft, > what if it first looked through the run queue in credit order at only > vcpus that prefer to run on the given processor and had a certain > amount of credit, and if none were found it then considered the whole > run queue considering only hard affinity and credit? >=20 >=20 > runq_assign assumes that the run queue associated with vcpu->processor > is OK for vcpu to run on. If considering affinity, I'm not sure if > that can be assumed. I probably need to dig further into schedule.c to > see where vcpu->processor is being assigned initially. Anyway, with > only one run queue this doesn't matter for now. >=20 >=20 > choose_cpu / migrate will need to be updated, but currently migrate > never gets called because there's only one run queue. >=20 >=20 > Please let me know what you think. >=20 >=20 > Thanks, > Justin >=20 >=20 >=20 >=20 >=20 >=20 > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-1hjLgyYD1+FCUU5odLNV 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 v1.4.15 (GNU/Linux) iEYEABECAAYFAlKnFIYACgkQk4XaBE3IOsQLawCfX/m5VWMif6Zh44fgC4WT5cvX pH4AmgIbXcnFbQ3RC9gyoYQsYY9yjSsO =cuTF -----END PGP SIGNATURE----- --=-1hjLgyYD1+FCUU5odLNV-- --===============8177354532032270374== 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 --===============8177354532032270374==--