From: Dario Faggioli <raistlin.df@gmail.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 15:16:29 +0100 [thread overview]
Message-ID: <1455286589.3148.362.camel@gmail.com> (raw)
In-Reply-To: <1455274239.3148.342.camel@citrix.com>
[-- Attachment #1.1: Type: text/plain, Size: 2042 bytes --]
[Yes, replying to myself]
On Fri, 2016-02-12 at 11:50 +0100, Dario Faggioli wrote:
> 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.
>
Which is indeed the case, in the case of this svc->flags, but not for
other cases when svc->flags is used, for manipulating the other two
existing flags (see, for instance
be6507509454adf3bb5a50b9406c88504e996d5a "credit1: Use atomic bit
operations for the flags structure").
So what I want is really the opposite of what I said above: set_bit()
is ok, and I need the atomic test_and_clear().
-ENEEDMORECOFFEEATMORNING :-/
Thanks again 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
prev parent reply other threads:[~2016-02-12 14:16 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
2016-02-12 14:16 ` Dario Faggioli [this message]
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=1455286589.3148.362.camel@gmail.com \
--to=raistlin.df@gmail.com \
--cc=JBeulich@suse.com \
--cc=george.dunlap@eu.citrix.com \
--cc=raistlin@linux.it \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.