From: Tianyang Chen <tiche@seas.upenn.edu>
To: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: Meng Xu <xumengpanda@gmail.com>
Subject: Questions about the use of idle_vcpu[]
Date: Thu, 14 Jan 2016 20:04:55 -0500 [thread overview]
Message-ID: <569845B7.2060207@seas.upenn.edu> (raw)
Hello,
I'm confused by the use of idle_vcpu[] in Xen schedulers. In credit,
credit2 and rtds schedulers, they are used in conjunction with variable
"tasklet_work_scheduled" like this:
if ( tasklet_work_scheduled )
{
snext = #_VCPU(idle_vcpu[cpu]);
....
}
The idle_vcpu array is initialized in cpu_schedule_up() and indeed they
are set in corresponding alloc_vdata() to have IDLE_CREDIT and 0 weight
or DEFAULT_PERIOD and 0 budget.
The value of tasklet_work_scheduled comes from scheduler.c interface.
According to the comments in sched_credit2.c, if there's tasklet work to
do, we want to chose the idle vcpu for this processor, and mark the
current for delayed runqueue add. Can someone elaborate the reason why
an idle vcpu should be picked? What does an idle_vcpu do to a tasklet? I
feel like I'm missing something here.
If an idle vcpu is picked, the ret.time is set accordingly in both
credit and credit2 by checking whether snext is idle. if so, credit
returns -1 and credit2 returns 2ms. However, there is no corresponding
code in the RTDS scheduler to handle this. When an idle_vcpu is picked,
the value of ret.time would be 0 and the scheduler would be invoked
again. What is the logic behind this?
I'd appreciate it if anyone could point me to the right direction.
Thanks,
Tianyang Chen
next reply other threads:[~2016-01-15 1:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-15 1:04 Tianyang Chen [this message]
2016-01-18 10:47 ` Questions about the use of idle_vcpu[] George Dunlap
2016-01-18 11:00 ` Dario Faggioli
2016-01-18 12:37 ` George Dunlap
2016-01-18 12:47 ` Dario Faggioli
2016-01-18 14:12 ` Load calculation refresh in credit2 (was in Re: Questions about the use of idle_vcpu[]) George Dunlap
2016-01-19 9:23 ` Dario Faggioli
2016-01-18 16:07 ` Questions about the use of idle_vcpu[] Meng Xu
2016-01-18 16:32 ` Dario Faggioli
2016-01-18 16:41 ` Meng Xu
2016-01-19 22:59 ` Tianyang Chen
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=569845B7.2060207@seas.upenn.edu \
--to=tiche@seas.upenn.edu \
--cc=xen-devel@lists.xen.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 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).