From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH] xen: credit2: enable per cpu runqueue creation Date: Fri, 9 Jun 2017 18:47:21 +0200 Message-ID: <1497026841.26212.15.camel@citrix.com> References: <20170411161517.1800-1-kpraveen.lkml@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2890887347632364205==" Return-path: In-Reply-To: <20170411161517.1800-1-kpraveen.lkml@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Praveen Kumar , george.dunlap@eu.citrix.com Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============2890887347632364205== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-EX2ShMnh0/nFWJ8qXMtw" --=-EX2ShMnh0/nFWJ8qXMtw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2017-04-11 at 21:45 +0530, Praveen Kumar wrote: > The patch introduces a new command line option 'cpu' that when used > will create > runqueue per logical pCPU. This may be useful for small systems, and > also for > development, performance evalution and comparison. >=20 > Signed-off-by: Praveen Kumar > Reviewed-by: Dario Faggioli >=20 Hey Geoge, I don't see this patch in staging, nor I think you've commented on it. IIRC, it was sent very close to feature freeze... So, is it possible that it fell through some crack? :-) Any thoughts about it? If not, what about applying? :-D Thanks and Regards, Dario > --- > =C2=A0docs/misc/xen-command-line.markdown |=C2=A0=C2=A03 ++- > =C2=A0xen/common/sched_credit2.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0| 15 +++++++++++---- > =C2=A02 files changed, 13 insertions(+), 5 deletions(-) >=20 > diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen- > command-line.markdown > index 5815d87dab..6e73766574 100644 > --- a/docs/misc/xen-command-line.markdown > +++ b/docs/misc/xen-command-line.markdown > @@ -525,7 +525,7 @@ also slow in responding to load changes. > =C2=A0The default value of `1 sec` is rather long. > =C2=A0 > =C2=A0### credit2\_runqueue > -> `=3D core | socket | node | all` > +> `=3D cpu | core | socket | node | all` > =C2=A0 > =C2=A0> Default: `socket` > =C2=A0 > @@ -536,6 +536,7 @@ balancing (for instance, it will deal better with > hyperthreading), > =C2=A0but also more overhead. > =C2=A0 > =C2=A0Available alternatives, with their meaning, are: > +* `cpu`: one runqueue per each logical pCPUs of the host; > =C2=A0* `core`: one runqueue per each physical core of the host; > =C2=A0* `socket`: one runqueue per each physical socket (which often, > =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=A0but not always, matches a NUMA node) of the host; > diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c > index bb1c657e76..ee7b443f9e 100644 > --- a/xen/common/sched_credit2.c > +++ b/xen/common/sched_credit2.c > @@ -301,6 +301,9 @@ integer_param("credit2_balance_over", > opt_overload_balance_tolerance); > =C2=A0 * want that to happen basing on topology. At the moment, it is > possible > =C2=A0 * to choose to arrange runqueues to be: > =C2=A0 * > + * - per-cpu: meaning that there will be one runqueue per logical > cpu. This > + *=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0will happen when if the opt_runqueue parameter is set > to 'cpu'. > + * > =C2=A0 * - per-core: meaning that there will be one runqueue per each > physical > =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=A0=C2=A0core of the host. This will happen if the > opt_runqueue > =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=A0=C2=A0parameter is set to 'core'; > @@ -322,11 +325,13 @@ integer_param("credit2_balance_over", > opt_overload_balance_tolerance); > =C2=A0 * either the same physical core, the same physical socket, the sam= e > NUMA > =C2=A0 * node, or just all of them, will be put together to form > runqueues. > =C2=A0 */ > -#define OPT_RUNQUEUE_CORE=C2=A0=C2=A0=C2=A00 > -#define OPT_RUNQUEUE_SOCKET 1 > -#define OPT_RUNQUEUE_NODE=C2=A0=C2=A0=C2=A02 > -#define OPT_RUNQUEUE_ALL=C2=A0=C2=A0=C2=A0=C2=A03 > +#define OPT_RUNQUEUE_CPU=C2=A0=C2=A0=C2=A0=C2=A00 > +#define OPT_RUNQUEUE_CORE=C2=A0=C2=A0=C2=A01 > +#define OPT_RUNQUEUE_SOCKET 2 > +#define OPT_RUNQUEUE_NODE=C2=A0=C2=A0=C2=A03 > +#define OPT_RUNQUEUE_ALL=C2=A0=C2=A0=C2=A0=C2=A04 > =C2=A0static const char *const opt_runqueue_str[] =3D { > +=C2=A0=C2=A0=C2=A0=C2=A0[OPT_RUNQUEUE_CPU] =3D "cpu", > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0[OPT_RUNQUEUE_CORE] =3D "core", > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0[OPT_RUNQUEUE_SOCKET] =3D "socket", > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0[OPT_RUNQUEUE_NODE] =3D "node", > @@ -682,6 +687,8 @@ cpu_to_runqueue(struct csched2_private *prv, > unsigned int cpu) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0BUG_ON(cpu_to_socke= t(cpu) =3D=3D XEN_INVALID_SOCKET_ID || > =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=A0=C2=A0=C2=A0=C2=A0cpu_to_socket(peer_cpu) =3D=3D XEN_INVALID_SOCKET_I= D); > =C2=A0 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (opt_runqueue =3D=3D = OPT_RUNQUEUE_CPU) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= continue; > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if ( opt_runqueue = =3D=3D OPT_RUNQUEUE_ALL || > =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=A0=C2=A0(opt_runqueue =3D=3D OPT_RUNQUEUE_CORE && > same_core(peer_cpu, cpu)) || > =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=A0=C2=A0(opt_runqueue =3D=3D OPT_RUNQUEUE_SOCKET && > same_socket(peer_cpu, cpu)) || --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-EX2ShMnh0/nFWJ8qXMtw 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 iQIcBAABCAAGBQJZOtEZAAoJEBZCeImluHPurSIP/0tGXKXVGsa6tso2rF/h6mN3 l1LtuFDBSuEshOmOFWkb2waP68roZjNrGVIXD4Vcg8qqrpR7re16EISkAfSsp5LX robpeVCb0DdhNalvUjqxKH/Ort7hqpgTWimgRhaHMWCaQwA+QFI/yv4TD2SB2hAS WLMT0O2Rki+3bjrXHYM6PYi6c+UU2LfAWEMewLfVY503B6F1IYep7PP2B31rsURk sxXiBvnhu8rUmk6pCyJ7Ho6QQoS+btRfMxBdxnzq0ZC2cD4v0LwEmmtki21AdHsE IGAsNc4NX0/a0Lz+6ZvaB7XLmQPmlJLE7umdxhkS2wZrP2T5ZjstW4+JsLxYMtWB HCHOjjzDPGEp4rDNT7on6j0F5CQeqFbx3UqwE6uMswmUUgjLAGDDnwlEQOGirGpj fohoAcsWQvwJoufSELOIK71xmSZe1JOewngJS8Xz057aub/f5GN3d1Gzv/c4++n6 oysLPVAMv8nISV2weB0HNEISSYl6PON8SKcgn7epQuxVfBpNJc1nFPJx0zH/w406 Da5FQ4tnPfJPoTDar8MffYzxuAtwg7hbVcT0zyCFa+StGEA5dypcwURTR6ob7fE2 FRzbNvkApNHeR0u/7dZl+kqwstBZb/MGq3dzOsd3gGIExIK+dvur9j/ta6F+o1/s c9yRbOtWrzuR5H9gy0b4 =hwtE -----END PGP SIGNATURE----- --=-EX2ShMnh0/nFWJ8qXMtw-- --===============2890887347632364205== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============2890887347632364205==--