From: Dario Faggioli <dario.faggioli@citrix.com>
To: George Dunlap <george.dunlap@citrix.com>, xen-devel@lists.xenproject.org
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH v3 2/2] xen: credit1: avoid boosting vCPUs being "just" migrated
Date: Wed, 24 Feb 2016 12:12:14 +0100 [thread overview]
Message-ID: <1456312334.17312.14.camel@citrix.com> (raw)
In-Reply-To: <56CD8947.4050307@citrix.com>
[-- Attachment #1.1: Type: text/plain, Size: 2558 bytes --]
On Wed, 2016-02-24 at 10:43 +0000, George Dunlap wrote:
> On 12/02/16 16:29, Dario Faggioli wrote:
> >
> > @@ -1022,11 +1037,18 @@ csched_vcpu_wake(const struct scheduler
> > *ops, struct vcpu *vc)
> > * more CPU resource intensive VCPUs without impacting
> > overall
> > * system fairness.
> > *
> > - * The one exception is for VCPUs of capped domains unpausing
> > - * after earning credits they had overspent. We don't boost
> > - * those.
> > + * There are two cases, when we don't want to boost:
> > + * - VCPUs that are waking up after a migration, rather than
> > + * after having block;
> > + * - VCPUs of capped domains unpausing after earning credits
> > + * they had overspent.
> > + *
> > + * Note that checking whether we are "only" migrating must be
> > + * done up front, as we do not want the clearing of the bit we
> > + * set in csched_cpu_pick() to be short-circuited away.
> > */
> > - if ( svc->pri == CSCHED_PRI_TS_UNDER &&
> > + if ( !test_and_clear_bit(CSCHED_FLAG_VCPU_MIGRATING, &svc-
> > >flags) &&
> > + svc->pri == CSCHED_PRI_TS_UNDER &&
> > !test_bit(CSCHED_FLAG_VCPU_PARKED, &svc->flags) )
>
> Sorry to be late reviewing this.
>
No problem. Thanks for getting to it, actually, as I've got a few more
patches stacked on top of these outstanding series.
> So we always want to clear the 'migrating' flag, regardless of
> whether
> we do anything with boosting. Would that logic be clearer if we
> cleared
> it as a separate step, storing the result in a local variable? E.g.:
>
> bool migrating;
>
> ...
>
> /* Always clear migrating flag if it's set */
> migrating = test_and_clear_bit(...)
>
> if ( !migrating && ...) {
> }
>
> Then we wouldn't need the last paragraph in the comment.
>
Yes, I think I like this better.
> That said, this is v3, so if you'd rather just get this in as it is,
> then you can have my Acked-by as well.
>
No, I'll resend... If I make (only) this change, can I resend directly
with your Acked-by?
Thanks and Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-02-24 11:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-12 16:29 [PATCH v3 0/2] xen: sched: Credit1 shouldn't boost vcpus being migrated Dario Faggioli
2016-02-12 16:29 ` [PATCH v3 1/2] xen: credit1: trace vCPU boost/unboost Dario Faggioli
2016-02-24 10:31 ` George Dunlap
2016-02-12 16:29 ` [PATCH v3 2/2] xen: credit1: avoid boosting vCPUs being "just" migrated Dario Faggioli
2016-02-24 10:43 ` George Dunlap
2016-02-24 11:12 ` Dario Faggioli [this message]
2016-02-24 11:14 ` George Dunlap
2016-02-24 17:47 ` Dario Faggioli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456312334.17312.14.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=JBeulich@suse.com \
--cc=george.dunlap@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).