From: Keir Fraser <keir.fraser@eu.citrix.com>
To: "Jiang, Yunhong" <yunhong.jiang@intel.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Cc: Dulloor <dulloor@gmail.com>
Subject: Re: [PROPOSAL] Doing work in idle-vcpu context
Date: Mon, 19 Apr 2010 11:52:55 +0100 [thread overview]
Message-ID: <C7F1F497.11B73%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <C7EE6596.1192F%keir.fraser@eu.citrix.com>
So I've now implemented this at the tip of xen-unstable staging tree. Except
that I retasked the concept of 'tasklets' to implement this, rather than
introducing a whole new abstraction like Linux workqueues.
Thanks to Dulloor for initial changes to the credit scheduler. I should have
acknowledged you in the changeset comment too: sorry about that. :-(
George: let me know if the scheduler changes in c/s 21197 look okay.
Thanks,
Keir
On 16/04/2010 19:05, "Keir Fraser" <keir.fraser@eu.citrix.com> wrote:
> George, Yunhong, and others,
>
> So, it seems that runing stop_machine_run(), and now
> continue_hypercall_on_cpu(), in softirq context is a bit of a problem.
> Because the softirq can stop the currently-running vcpu from being
> descheduled we can end up with subtle deadlocks. For example, with s_m_r()
> we try to rendezvous all cpus in softirq context -- we can have CPU A enter
> the softirq interrupting VCPU X, meanwhile VCPU Y on CPU B is spinning
> trying to pause VCPU X. Hence CPU B doesn't get into softirq, and so CPU A
> never leaves it, and we have deadlock.
>
> There are various possible solutions to this, but one of the architecturally
> neatest would be to run the s_m_r() and c_h_o_c() work in a
> 'Linux-workqueue' type of environment -- i.e., in a proper non-guest vcpu
> context. Rather than introducing the whole kthread concept into Xen, one
> possibility would be to schedule this work on the idle vcpus -- effectively
> promoting idle vcpus to a more general kind of 'Xen worker vcpu' whose job
> can include running the idle loop.
>
> One bit of mechanism this would require is the ability to bump the idle vcpu
> priority up - preferably to 'max' priority forcing it to run next until we
> return it to idle/lowest priority. George: how hard would such a mechanism
> be to implement do you think?
>
> More generally: what do people think of this idea?
>
> Thanks,
> Keir
>
next prev parent reply other threads:[~2010-04-19 10:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-16 18:05 [PROPOSAL] Doing work in idle-vcpu context Keir Fraser
2010-04-19 5:00 ` Juergen Gross
2010-04-19 5:55 ` Jiang, Yunhong
2010-04-19 6:08 ` Dulloor
2010-04-19 6:53 ` Keir Fraser
2010-04-19 6:45 ` Keir Fraser
2010-04-19 9:43 ` George Dunlap
2010-04-19 10:52 ` Keir Fraser [this message]
2010-04-20 6:50 ` Dulloor
2010-04-20 12:47 ` Keir Fraser
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=C7F1F497.11B73%keir.fraser@eu.citrix.com \
--to=keir.fraser@eu.citrix.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=dulloor@gmail.com \
--cc=xen-devel@lists.xensource.com \
--cc=yunhong.jiang@intel.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).