From: Dario Faggioli <dario.faggioli@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 2/2] xen: credit1: avoid boosting vCPUs being "just" migrated
Date: Fri, 12 Feb 2016 11:50:39 +0100 [thread overview]
Message-ID: <1455274239.3148.342.camel@citrix.com> (raw)
In-Reply-To: <56BDB91102000078000D153D@prv-mh.provo.novell.com>
[-- Attachment #1.1: Type: text/plain, Size: 1445 bytes --]
On Fri, 2016-02-12 at 02:50 -0700, Jan Beulich wrote:
> > > > On 12.02.16 at 10:37, <dario.faggioli@citrix.com> wrote:
> > @@ -787,6 +788,16 @@ _csched_cpu_pick(const struct scheduler *ops,
> > struct vcpu *vc, bool_t commit)
> > static int
> > csched_cpu_pick(const struct scheduler *ops, struct vcpu *vc)
> > {
> > + struct csched_vcpu *svc = CSCHED_VCPU(vc);
> > +
> > + /*
> > + * We have been called by vcpu_migrate() (in schedule.c), as
> > part
> > + * of the process of seeing if vc can be migrated to another
> > pcpu.
> > + * We make a note about this in svc->flags so that later, in
> > + * csched_vcpu_wake() (still called from vcpu_migrate()) we
> > won't
> > + * get boosted, which we don't deserve as we are "only"
> > migrating.
> > + */
> > + set_bit(CSCHED_FLAG_VCPU_MIGRATING, &svc->flags);
> > return _csched_cpu_pick(ops, vc, 1);
> > }
>
> I think you either want __set_bit() here or ...
>
Yes, this is completely serialized by the vcpu's scheduler lock, so I
indeed want __set_bit(), sorry for the overlook.
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-12 10:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-12 9:36 [PATCH 0/2] xen: sched: Credit1 shouldn't boost vcpus being migrated Dario Faggioli
2016-02-12 9:36 ` [PATCH v2 1/2] xen: credit1: trace vCPU boost/unboost Dario Faggioli
2016-02-12 9:37 ` [PATCH v2 2/2] xen: credit1: avoid boosting vCPUs being "just" migrated Dario Faggioli
2016-02-12 9:50 ` Jan Beulich
2016-02-12 10:50 ` Dario Faggioli [this message]
2016-02-12 14:16 ` 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=1455274239.3148.342.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=JBeulich@suse.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).