From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v2 07/10] xen: credit2: always mark a tickled pCPU as... tickled! Date: Fri, 10 Feb 2017 00:48:59 +0100 Message-ID: <1486684139.3042.48.camel@citrix.com> References: <148664844741.595.10506268024432565895.stgit@Solace.fritz.box> <148664874799.595.17524826454909514715.stgit@Solace.fritz.box> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8284119079690626524==" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cbySb-0000e7-H2 for xen-devel@lists.xenproject.org; Thu, 09 Feb 2017 23:49:09 +0000 In-Reply-To: <148664874799.595.17524826454909514715.stgit@Solace.fritz.box> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: xen-devel@lists.xenproject.org Cc: George Dunlap , Anshul Makkar List-Id: xen-devel@lists.xenproject.org --===============8284119079690626524== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-+rI6kEEKckWJTSaW/ZaL" --=-+rI6kEEKckWJTSaW/ZaL Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2017-02-09 at 14:59 +0100, Dario Faggioli wrote: > In fact, whether or not a pCPU has been tickled, and is > therefore about to re-schedule, is something we look at > and base decisions on in various places. >=20 > So, let's make sure that we do that basing on accurate > information. >=20 > While there, also tweak a little bit smt_idle_mask_clear() > (used for implementing SMT support), so that it only alter > the relevant cpumask when there is the actual need for this. > (This is only for reduced overhead, behavior remains the > same). >=20 So, while working on other things with this series applied, I noticed some strange behavior, for which it turned out this patch is responsible. More specifically... > diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c > index addee7b..bfb4891 100644 > @@ -1289,9 +1300,8 @@ runq_tickle(const struct scheduler *ops, struct > csched2_vcpu *new, s_time_t now) > =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=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0sizeof(d), > =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=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0(unsigned char *)&d); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0} > -=C2=A0=C2=A0=C2=A0=C2=A0__cpumask_set_cpu(ipid, &rqd->tickled); > -=C2=A0=C2=A0=C2=A0=C2=A0smt_idle_mask_clear(ipid, &rqd->smt_idle); > -=C2=A0=C2=A0=C2=A0=C2=A0cpu_raise_softirq(ipid, SCHEDULE_SOFTIRQ); > + > +=C2=A0=C2=A0=C2=A0=C2=A0tickle_cpu(cpu, rqd); > =C2=A0 ... this, quite obviously, wants to be: =C2=A0 tickle_cpu(ipid, rqd); I'll fix this in v2. Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-+rI6kEEKckWJTSaW/ZaL 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 iQIcBAABCAAGBQJYnP/rAAoJEBZCeImluHPuZWAP/RJZ61fh41TuhUSkhemnzH/8 hf41r4bu9Xh4witVtS7pfWoeG4LaZWjnYtKPuwCc7O0u02cPWNw84OuSDSDyyW/Y MaZ0grt5XA3sizJ7r+DXP4G6+7MeQzyqq6ZpoK6/8vHjhzQWtDIaC0soBr25ISmZ pqomFuGEFmLYxIMRFcNq7g9+NFkqAaosCNjGnBQuFi5EsHBBUmtiJimyv7m1ai6M WBq/zQehRDaOS8FnvU5Qf75HuvsTVcWprR4Cb07jMSn5FGkR3hk1IMVsNq3zUQUZ gZiPYAq9NuAcjGsM+c5Z6KgDTDQfkCkpD/Py/ToR/Cd4KZupXnZBlXATtUEXo4cQ VxeilFWMuHdln8VxTOe1Qud7G9wjKKmrXKf3PZa0UpzerKzxDfyElsxGW4WE0u5x K8f7vvb5t8WXHinFtBMeIKOOtLf8DIsZd6ennELc7NG3/X5i1vrBMeVC4dai6rqU 8X3nSmvzuG7McvLxWJSrcaRa1Rsd47g/1CTaKtTPv7zhzCCZrHr8E2w/kRCpExqn K+8W6SA/sFPG2wVNFG0UGYY9UTKIw+QxjqrazfFW/8kA1g9HZ24bMobA0nTLsItO iwc4C+5IVcMhVFTGOBHMsOhNu6jy+jiE1BCDQ7K/n+OMCP2O1JtsTUI2My31i7tb cbFqWR2YVyJ28wrClIPV =AfCy -----END PGP SIGNATURE----- --=-+rI6kEEKckWJTSaW/ZaL-- --===============8284119079690626524== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============8284119079690626524==--