From: Dario Faggioli <dario.faggioli@citrix.com>
To: Meng Xu <xumengpanda@gmail.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Meng Xu <mengxu@cis.upenn.edu>
Subject: Re: [PATCH v3 2/6] xen: sched: fix locking for insert_vcpu() in credit1 and RTDS
Date: Wed, 4 Nov 2015 16:52:01 +0100 [thread overview]
Message-ID: <1446652321.3829.127.camel@citrix.com> (raw)
In-Reply-To: <CAENZ-+=q3N5E-b6hQ2YYexaZnUPLxM6WYRdneJmeJfS6C5JuBA@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2585 bytes --]
On Wed, 2015-11-04 at 10:01 -0500, Meng Xu wrote:
> 2015-11-04 9:12 GMT-05:00 Dario Faggioli <dario.faggioli@citrix.com>:
> > Just FTR (and for next time :-D), is the above something that can
> > be
> > interpreted as a 'Reviewed-by: Meng Xu <xxx>' ? If no (e.g.,
> > because
> > you haven't looking thoroughly enough to feel confident to express
> > it),
> > then fine, I was just asking.
> Thank you very much for explaining this for me. :-)
>
> I feel confident about the changes for RTDS scheduler.
>
Ok.
> I'm not so confident about the change in the schedule.c. To be
> specific, this patch removes insert_vcpu in schedule_cpu_switch() in
> schedule.c;
>
It removes the attempt of inserting the idle vCPU in the runqueue of
the scheduler of the target cpupool for the pCPU.
More specifically, this line:
SCHED_OP(new_ops, insert_vcpu, idle);
If we look at the various ways in which insert_vcpu is implemented, we
have:
csched_vcpu_insert:
if ( !__vcpu_on_runq(svc) && vcpu_runnable(vc) && !vc->is_running )
__runq_insert(vc->processor, svc);
but the pCPU being switched is free, i.e., it is not in any cpupool,
and it is idling. So, the idle vCPU is running, and the condition above
is false, which means __runq_insert() is not really called.
csched2_vcpu_insert:
if ( ! is_idle_vcpu(vc) )
{
...
}
so trying to insert the idle vCPU is actually a nop.
rt_vcpu_insert:
if ( is_idle_vcpu(vc) )
return;
a nop again.
My point being that this patch actually removes nothing but a bunch of
if()-s, with no effect at all.
> I'm not so sure if it is ok to insert_vcpu when a domain is moved.
>
Hopefully, I addressed your doubts.
BTW, we're not talking about a domain being moved between pools. That
is done with another function. schedule_cpu_switch() is about taking a
pCPU off from a cpupool, or assigning a pCPU to cpupool.
> (Next time, I will stand out and ask although it may be a stupid
> question. ;-) )
>
Sure! And this does not look a stupid question to me. :-)
> So as to this patch, I will say:
> As far as the RTDS scheduler is concerned: Reviewed-by: Meng Xu <
> mengxu@cis.upenn.edu>
>
Ok, I haven't sent v4 yet, so I'll apply it there. Thanks.
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:[~2015-11-04 15:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-29 23:04 [PATCH v3 0/6] xen: sched: fix locking of {insert, remove}_vcpu() Dario Faggioli
2015-10-29 23:04 ` [PATCH v3 1/6] xen: sched: fix locking of remove_vcpu() in credit1 Dario Faggioli
2015-11-02 18:04 ` George Dunlap
2015-11-03 17:15 ` Dario Faggioli
2015-10-29 23:04 ` [PATCH v3 2/6] xen: sched: fix locking for insert_vcpu() in credit1 and RTDS Dario Faggioli
2015-10-30 23:00 ` Meng Xu
2015-11-02 8:03 ` Dario Faggioli
2015-11-02 14:45 ` Meng Xu
2015-11-04 14:12 ` Dario Faggioli
2015-11-04 15:01 ` Meng Xu
2015-11-04 15:52 ` Dario Faggioli [this message]
2015-11-05 3:55 ` Meng Xu
2015-10-29 23:04 ` [PATCH v3 3/6] xen: sched: clarify use cases of schedule_cpu_switch() Dario Faggioli
2015-10-29 23:59 ` Dario Faggioli
2015-10-30 4:33 ` Juergen Gross
2015-11-02 18:23 ` George Dunlap
2015-10-29 23:04 ` [PATCH v3 4/6] xen: sched: better handle (not) inserting idle vCPUs in runqueues Dario Faggioli
2015-10-29 23:04 ` [PATCH v3 5/6] xen: sched: get rid of the per domain vCPU list in RTDS Dario Faggioli
2015-11-02 18:57 ` George Dunlap
2015-10-29 23:04 ` [PATCH v3 6/6] xen: sched: get rid of the per domain vCPU list in Credit2 Dario Faggioli
2015-11-02 18:56 ` George Dunlap
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=1446652321.3829.127.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=mengxu@cis.upenn.edu \
--cc=xen-devel@lists.xenproject.org \
--cc=xumengpanda@gmail.com \
/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.