From: Sergey Dyasli <sergey.dyasli@citrix.com>
To: "JBeulich@suse.com" <JBeulich@suse.com>,
Igor Druzhinin <igor.druzhinin@citrix.com>
Cc: Sergey Dyasli <sergey.dyasli@citrix.com>,
Kevin Tian <kevin.tian@intel.com>,
Andrew Cooper <Andrew.Cooper3@citrix.com>,
George Dunlap <George.Dunlap@citrix.com>,
"julien.grall@arm.com" <julien.grall@arm.com>,
"raistlin@linux.it" <raistlin@linux.it>,
"jun.nakajima@intel.com" <jun.nakajima@intel.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: Ping: [PATCH] VMX: sync CPU state upon vCPU destruction
Date: Tue, 21 Nov 2017 17:00:12 +0000 [thread overview]
Message-ID: <1511283612.3153.1.camel@citrix.com> (raw)
In-Reply-To: <5A14544F02000078001909F8@prv-mh.provo.novell.com>
On Tue, 2017-11-21 at 08:29 -0700, Jan Beulich wrote:
> > > > On 21.11.17 at 15:07, <igor.druzhinin@citrix.com> wrote:
> >
> > On 21/11/17 13:22, Jan Beulich wrote:
> > > > > > On 09.11.17 at 15:49, <JBeulich@suse.com> wrote:
> > > >
> > > > See the code comment being added for why we need this.
> > > >
> > > > Reported-by: Igor Druzhinin <igor.druzhinin@citrix.com>
> > > > Signed-off-by: Jan Beulich <jbeulich@suse.com>
> > >
> > > I realize we aren't settled yet on where to put the sync call. The
> > > discussion appears to have stalled, though. Just to recap,
> > > alternatives to the placement below are
> > > - at the top of complete_domain_destroy(), being the specific
> > > RCU callback exhibiting the problem (others are unlikely to
> > > touch guest state)
> > > - in rcu_do_batch(), paralleling the similar call from
> > > do_tasklet_work()
> >
> > rcu_do_batch() sounds better to me. As I said before I think that the
> > problem is general for the hypervisor (not for VMX only) and might
> > appear in other places as well.
>
> The question here is: In what other cases do we expect an RCU
> callback to possibly touch guest state? I think the common use is
> to merely free some memory in a delayed fashion.
>
> > Those choices that you outlined appear to be different in terms whether
> > we solve the general problem and probably have some minor performance
> > impact or we solve the ad-hoc problem but make the system more
> > entangled. Here I'm more inclined to the first choice because this
> > particular scenario the performance impact should be negligible.
>
> For the problem at hand there's no question about a
> performance effect. The question is whether doing this for _other_
> RCU callbacks would introduce a performance drop in certain cases.
So what are performance implications of my original suggestion of
removing !v->is_running check from vmx_ctxt_switch_from() ?
From what I can see:
1. Another field in struct vcpu will be checked instead (vmcs_pa)
2. Additionally this_cpu(current_vmcs) will be loaded, which shouldn't
be terrible, given how heavy a context switch already is.
--
Thanks,
Sergey
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-11-21 17:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-09 14:49 [PATCH] VMX: sync CPU state upon vCPU destruction Jan Beulich
2017-11-09 15:02 ` Dario Faggioli
2017-11-10 8:41 ` Sergey Dyasli
2017-11-10 9:50 ` Dario Faggioli
2017-11-10 10:30 ` Jan Beulich
2017-11-10 14:46 ` Igor Druzhinin
2017-11-13 9:51 ` Jan Beulich
2017-11-21 13:22 ` Ping: " Jan Beulich
2017-11-21 14:07 ` Igor Druzhinin
2017-11-21 15:29 ` Jan Beulich
2017-11-21 16:00 ` Igor Druzhinin
2017-11-21 16:42 ` Dario Faggioli
2017-11-21 16:58 ` George Dunlap
2017-11-21 17:00 ` Sergey Dyasli [this message]
2017-11-21 17:26 ` Jan Beulich
2017-11-21 16:08 ` George Dunlap
2017-11-21 16:26 ` Igor Druzhinin
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=1511283612.3153.1.camel@citrix.com \
--to=sergey.dyasli@citrix.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=George.Dunlap@citrix.com \
--cc=JBeulich@suse.com \
--cc=igor.druzhinin@citrix.com \
--cc=julien.grall@arm.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=raistlin@linux.it \
--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 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).