From: "Elnikety, Eslam" Subject: Re: [PATCH] sched/credit: avoid priority boost for capped domains when unpark Date: Fri, 3 May 2019 19:41:45 +0000 Message-ID: <562F9814-30CE-467C-8027-8F21FC6C2845@amazon.com> References: <20190503153839.19932-1-elnikety@amazon.com> <9434ed49fc68a05999e130abfde973663ed41d2d.camel@suse.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6978331471066717546==" Return-path: Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hMe4T-0007rv-4A for xen-devel@lists.xenproject.org; Fri, 03 May 2019 19:42:13 +0000 In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" To: Lars Kurth Cc: George Dunlap , xen-devel , Lars Kurth , Dario Faggioli List-Id: xen-devel@lists.xenproject.org --===============6978331471066717546== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_562F981430CE467C80278F21FC6C2845amazoncom_" --_000_562F981430CE467C80278F21FC6C2845amazoncom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On 3. May 2019, at 20:56, Lars Kurth > wrote: On 3 May 2019, at 10:48, Dario Faggioli > wrote: On Fri, 2019-05-03 at 15:38 +0000, Eslam Elnikety wrote: When unpausing a capped domain, the scheduler currently clears the CSCHED_FLAG_VCPU_PARKED flag before vcpu_wake(). This, in turn, causes the vcpu_wake to set CSCHED_PRI_TS_BOOST, resulting in an unfair credit boost. The comment around the changed lines already states that clearing the flag should happen AFTER the unpause. This bug was introduced in commit be650750945 "credit1: Use atomic bit operations for the flags structure". Original patch author credit: Xi Xiong. Mmm... I'm not an expert of these things, but doesn't this means we need a "Signed-off-by: Xi Xiong >" then? Cc= -ing Lars... As far as I can tell from a quick search on xen-devel@ Xi Xiong is or was an Amazon employee so a signed-off-by is not strictly necessary but you may want to say something like. Original patch author credit: Xi Xiong of Amazon Lars Thanks for the prompt responses, Lars and Dario. Indeed. Xi was with Amazon. I will adjust the commit message accordingly. (= I will also omit the additional comment as pointed out by Dario). --_000_562F981430CE467C80278F21FC6C2845amazoncom_ Content-Type: text/html; charset="us-ascii" Content-ID: <6FD7E4F90A5A8D47AE36FE7DB660885E@amazon.com> Content-Transfer-Encoding: quoted-printable
On 3. May 2019, at 20:56, Lars Kurth <lars.kurth.xen@gmail.com> wrote= :



On 3 May 2019, at 10:48, Dario Faggioli <dfaggioli@suse.com> wrote:

On Fri, 2019-05-03 at 15:38 +0000, Eslam Elnikety wrote:
When unpausing a capped domain, the sc= heduler currently clears the
CSCHED_FLAG_VCPU_PARKED flag before vcpu_wake(). This, in turn,
causes the
vcpu_wake to set CSCHED_PRI_TS_BOOST, resulting in an unfair credit
boost. The
comment around the changed lines already states that clearing the
flag should
happen AFTER the unpause. This bug was introduced in commit
be650750945
"credit1: Use atomic bit operations for the flags structure".

Original patch author credit: Xi Xiong.

Mmm... I'm not an expert of these things, but doesn't this means we
need a "Signed-off-by: Xi Xiong <xxx@yyy.zzz>" then? Cc-ing Lars...

As far as I can tell from a quick search on xen-devel@ Xi Xiong is or 
was an Amazon employee so a signed-off-by is not strictly necessary
but you may want to say something like.

Original patch author credit: Xi Xiong of Amazon

Lars

Thanks for the prompt responses, Lars and Dario.

Indeed. Xi was with Amazon. I will adjust the commit messag= e accordingly. (I will also omit the additional comment as pointed out by D= ario).
--_000_562F981430CE467C80278F21FC6C2845amazoncom_-- --===============6978331471066717546== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcKaHR0cHM6Ly9saXN0 cy54ZW5wcm9qZWN0Lm9yZy9tYWlsbWFuL2xpc3RpbmZvL3hlbi1kZXZlbA== --===============6978331471066717546==--