From: Dario Faggioli <dario.faggioli@citrix.com>
To: Tianyang Chen <tiche@seas.upenn.edu>, xen-devel@lists.xenproject.org
Cc: george.dunlap@citrix.com, Dagaen Golomb <dgolomb@seas.upenn.edu>,
Meng Xu <mengxu@cis.upenn.edu>
Subject: Re: [PATCH v4] xen: sched: convert RTDS from time to event driven model
Date: Mon, 8 Feb 2016 22:23:10 +0100 [thread overview]
Message-ID: <1454966590.9227.597.camel@citrix.com> (raw)
In-Reply-To: <56B8E6AA.1000000@seas.upenn.edu>
[-- Attachment #1.1: Type: text/plain, Size: 2714 bytes --]
On Mon, 2016-02-08 at 14:04 -0500, Tianyang Chen wrote:
>
> On 2/8/2016 6:27 AM, Dario Faggioli wrote:
> >
> > I don't really follow, but I have the feeling that you're making it
> > sound more complicated like it is in reality... :-)
> >
>
> So my reasoning is that, when sleep() is called in sched_rt.c, a
> vcpu
> will need to be taken off from the replenishment event queue.
> However, a
> vcpu can be put to sleep/not-runnable without even calling sleep(),
>
Well, sure... for instance, it can block.
> which corresponds to a later "spurious wakeup". Is there any way
> that
> RTDS can know when this happens?
>
There is no way no one can tell what will happen in future but,
luckily, we don't need to care! There is no such thing as the
correspondence between spurious wakeups and sleeps.
> If not, in rt_vcpu_wake(), it needs to
> check, in all situations, if a vcpu is on the replenishment event
> queue
> or not. If not, add it back. I'm I right?
>
> vcpu running --> sleep(), taken off from replq
> vcpu on queue --> sleep(), taken off from replq
> vcpu not on queue --> sleep(), taken off from replq
>
No. What happens is, more or less, like this:
- sleep : take off from runq, take off from replq
- wakeup : put back in runq, put back in replq
- wakeup : already on runq, already on replq ==> nothing!
...
[becomes running]
...
- wakeup : on a cpu, already on replq ==> nothing!
> However,
>
> vcpu running/on queque/not on queue --> just not runnable anymore
> (still
> on replq) --> spurious wakeup (still on replq)
>
> vcpus shouldn't be added back to replq again.
>
Exactly, and in fact, you do nothing. :-)
> So in all cases, rt_vcpu_wake() always need to check if a vcpu is on
> the
> replq or not.
>
Eheh... looks like we agree on the fact that we disagree. :-)
> Now I think because of the addition of a replenishment queue,
> spurious
> wake up cannot be simply treated as NOP. Just like V4, the "Out"
> label
> basically maintains the replenishment queue.
>
I do think so. I also think that we may need to think about the
blocking case (i.e., whether to do something for removing the vcpu from
the replenishment queue or not). But really...
> Anyways, I agree it's gonna be easier to reason on v5 where all
> changes
> are applied.
>
... let's do this! :-)
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-08 21:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-01 4:32 [PATCH v4] xen: sched: convert RTDS from time to event driven model Tianyang Chen
2016-02-02 15:08 ` Dario Faggioli
2016-02-02 18:09 ` Tianyang Chen
2016-02-03 12:39 ` Dario Faggioli
2016-02-04 2:23 ` Tianyang Chen
2016-02-05 14:39 ` Dario Faggioli
2016-02-06 4:27 ` Tianyang Chen
2016-02-08 11:27 ` Dario Faggioli
2016-02-08 19:04 ` Tianyang Chen
2016-02-08 21:23 ` Dario Faggioli [this message]
2016-02-04 4:03 ` Meng Xu
2016-02-05 14:45 ` Dario Faggioli
2016-02-03 3:33 ` Meng Xu
2016-02-03 12:30 ` 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=1454966590.9227.597.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=dgolomb@seas.upenn.edu \
--cc=george.dunlap@citrix.com \
--cc=mengxu@cis.upenn.edu \
--cc=tiche@seas.upenn.edu \
--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.