From: Dario Faggioli <dario.faggioli@citrix.com>
To: "Zhang, Yang Z" <yang.z.zhang@intel.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Jan Beulich <jbeulich@suse.com>,
"hanweidong@huawei.com" <hanweidong@huawei.com>,
"john.liuqiming@huawei.com" <john.liuqiming@huawei.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
"zw.zhang@huawei.com" <zw.zhang@huawei.com>
Subject: Re: [PATCH] Remove a set operation for VCPU_KICK_SOFTIRQ when post interrupt to vm.
Date: Fri, 18 Sep 2015 14:56:01 +0200 [thread overview]
Message-ID: <1442580961.2691.23.camel@citrix.com> (raw)
In-Reply-To: <A9667DDFB95DB7438FA9D7D576C3D87E0ADB2B49@SHSMSX104.ccr.corp.intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 1403 bytes --]
On Fri, 2015-09-18 at 11:50 +0000, Zhang, Yang Z wrote:
> Andrew Cooper wrote on 2015-09-18:
> > On 18/09/15 12:40, Zhang, Yang Z wrote:
> > > But it only happens before do vmentry. Is it possible that
> > VCPU been preempted at any time when running in hypervisor mode?
> >
> > All vcpus may be preempted at any time by the Xen scheduler.
> >
> > However, paths through the hypervisor are synchronous, so a vcpu
> > will
> > notice that it has been preempted on the return-to-guest path, and
> > a
> > context switch will occur as appropriate.
>
> So the context switch only occurs on the return-to-guest patch or if
> the VCPU call schedule() by itself. It seems a little different from
> linux kernel which possible to preempt a task at any point.
>
It is, indeed. Xen does not 'preempt itself', like Linux does, and you
also don't call schedule() directly (like Linux does).
In fact, any time you want to reschedule, you need to raise
SCHEDULE_SOFTIRQ, which is then checked and serviced in do_softirq()
(and, for instance, not in process_pending_softirq(), specifically to
avoid preemptions!).
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-09-18 12:56 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1441637175-18070-1-git-send-email-john.liuqiming@huawei.com>
2015-09-07 14:24 ` [PATCH] Remove a set operation for VCPU_KICK_SOFTIRQ when post interrupt to vm Liuqiming (John)
2015-09-07 14:45 ` Jan Beulich
2015-09-08 0:39 ` Hanweidong (Randy)
2015-09-08 2:46 ` Zhang, Yang Z
2015-09-08 4:07 ` Liuqiming (John)
2015-09-08 8:10 ` Zhang, Yang Z
2015-09-08 8:49 ` Jan Beulich
2015-09-18 0:29 ` Zhang, Yang Z
2015-09-18 5:30 ` Jan Beulich
2015-09-18 11:40 ` Zhang, Yang Z
2015-09-18 11:44 ` Andrew Cooper
2015-09-18 11:50 ` Zhang, Yang Z
2015-09-18 12:56 ` Dario Faggioli [this message]
2015-09-23 3:50 ` Zhang, Yang Z
2015-09-23 7:42 ` Jan Beulich
2015-09-23 9:08 ` George Dunlap
2015-09-23 9:18 ` Zhang, Yang Z
2015-09-23 10:01 ` George Dunlap
2015-09-23 9:21 ` Jan Beulich
2015-09-23 9:15 ` Zhang, Yang Z
2015-09-23 9:31 ` Jan Beulich
2015-09-23 13:02 ` Zhang, Yang Z
2015-09-23 13:38 ` Hanweidong (Randy)
2015-09-23 13:41 ` Zhang, Yang Z
2015-09-24 2:41 ` Liuqiming (John)
2015-09-24 3:25 ` Zhang, Yang Z
2015-09-24 7:07 ` Liuqiming (John)
2015-09-24 8:07 ` Zhang, Yang Z
2015-10-10 6:32 ` Zhang, Yang Z
2015-10-10 9:55 ` Liuqiming (John)
2015-11-10 1:15 ` Zhang, Yang Z
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=1442580961.2691.23.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=hanweidong@huawei.com \
--cc=jbeulich@suse.com \
--cc=john.liuqiming@huawei.com \
--cc=xen-devel@lists.xenproject.org \
--cc=yang.z.zhang@intel.com \
--cc=zw.zhang@huawei.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).