From: Dario Faggioli <dario.faggioli@citrix.com>
To: Meng Xu <xumengpanda@gmail.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Tianyang Chen <tiche@seas.upenn.edu>,
George Dunlap <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: Fri, 5 Feb 2016 15:45:04 +0100 [thread overview]
Message-ID: <1454683504.9227.436.camel@citrix.com> (raw)
In-Reply-To: <CAENZ-+n49GosoJ9oDMfmiSRz6aDWu4+JtL5jYxM5LzqcAFP4=A@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2758 bytes --]
On Wed, 2016-02-03 at 23:03 -0500, Meng Xu wrote:
> On Wed, Feb 3, 2016 at 7:39 AM, Dario Faggioli
> <dario.faggioli@citrix.com> wrote:
> >
> > And, at this point, I'm starting thinking again that we want to
> > call
> > runq_tickle() in rt_context_saved(), at least in case
> > __RTDS_delayed_runq_add was set as, if we don't, we're missing
> > tickling
> > for the vcpu being inserted because of that.
> >
> > Of course, all the above, taken with a little bit of salt... i.e.,
> > I do
> > not expect to have got all the details right, especially in the
> > code,
> > but it should at least be effective in showing the idea.
> >
> > Thoughts?
>
>
> This is smart and we should be able to put it into this patch series.
>
It's in the code already...
> When a VCPU is stopped on a core, hasn't saved its context and has
> not
> been added back to runq/depletedq, we should delay the tickle until
> its context has been saved and it has been put back to the
> (runq/depletedq) queue.
>
...It's only this bit (the tickling) that we need to get right. :-)
> > Also, under what conditions we need, as soon as replenishment for
> > vcpu
> > X happened, to queue another replenishment for the same vcpu, at
> > its
> > next deadline? Always, I would say (unless the vcpu is sleeping,
> > because of the optimization you introduced)?
>
>
>
> I'm thinking the following example as to why we need to rearm the
> timer for the just-replenished VCPU (Although it's very likely I
> missed something.):
>
> A runnable VCPU (period = 10ms, budget = 4ms) is scheduled to run on
> a
> core at t = 0;
> at t = 4, its budget depleted and it's added to depletedq;
> at t=10, the replenish timer should fire and replenish the budget;
> I think we should arm the replenish timer for t = 20 so that its
> budget will get replenished at t = 20 for the period [20, 30];
> If we don't arm the timer at t = 20, how will the VCPU's budget be
> replenished at t=20?
>
> Please correct me if I'm wrong.
>
No, I think you're right. It was me that, during the first one or two
emails, was probably thinking with my CBS mindset! :-/
Now I see that we indeed need to have a replenishment event pretty much
always running for every (runnable) vcpu, and that's also what I'm
saying when replying to Tianyang in the other email...
Let's see if we can sort the terminology and spurious wakeup quirks,
and check in this code!! :-P
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-05 14:45 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
2016-02-04 4:03 ` Meng Xu
2016-02-05 14:45 ` Dario Faggioli [this message]
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=1454683504.9227.436.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 \
--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.