From: Ross Lagerwall <ross.lagerwall@citrix.com>
To: Jan Beulich <jbeulich@suse.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: "Juergen Gross" <jgross@suse.com>,
"Kevin Tian" <kevin.tian@intel.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Julien Grall" <julien@xen.org>, "Wei Liu" <wl@xen.org>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Jun Nakajima" <jun.nakajima@intel.com>,
xen-devel@lists.xenproject.org,
"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH] xen: do live patching only from main idle loop
Date: Mon, 2 Mar 2020 14:41:46 +0000 [thread overview]
Message-ID: <680f7622-3e4b-1049-cecc-527910739ca9@citrix.com> (raw)
In-Reply-To: <6b65b34d-0078-ad0c-9a6c-ada5d2828cc0@suse.com>
On 3/2/20 2:28 PM, Jan Beulich wrote:
> On 11.02.2020 10:31, Juergen Gross wrote:
>> One of the main design goals of core scheduling is to avoid actions
>> which are not directly related to the domain currently running on a
>> given cpu or core. Live patching is one of those actions which are
>> allowed taking place on a cpu only when the idle scheduling unit is
>> active on that cpu.
>>
>> Unfortunately live patching tries to force the cpus into the idle loop
>> just by raising the schedule softirq, which will no longer be
>> guaranteed to work with core scheduling active. Additionally there are
>> still some places in the hypervisor calling check_for_livepatch_work()
>> without being in the idle loop.
>>
>> It is easy to force a cpu into the main idle loop by scheduling a
>> tasklet on it. So switch live patching to use tasklets for switching to
>> idle and raising scheduling events. Additionally the calls of
>> check_for_livepatch_work() outside the main idle loop can be dropped.
>>
>> As tasklets are only running on idle vcpus and stop_machine_run()
>> is activating tasklets on all cpus but the one it has been called on
>> to rendezvous, it is mandatory for stop_machine_run() to be called on
>> an idle vcpu, too, as otherwise there is no way for scheduling to
>> activate the idle vcpu for the tasklet on the sibling of the cpu
>> stop_machine_run() has been called on.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>> ---
>> xen/arch/arm/domain.c | 9 ++++-----
>> xen/arch/arm/traps.c | 6 ------
>> xen/arch/x86/domain.c | 9 ++++-----
>> xen/arch/x86/hvm/svm/svm.c | 2 +-
>> xen/arch/x86/hvm/vmx/vmcs.c | 2 +-
>> xen/arch/x86/pv/domain.c | 2 +-
>> xen/arch/x86/setup.c | 2 +-
>> xen/common/livepatch.c | 39 ++++++++++++++++++++++++++++++++++-----
>> 8 files changed, 46 insertions(+), 25 deletions(-)
>
> Konrad, Ross - I was about to apply this when I noticed an ack
> by one of the two of you is still needed. Care to provide one
> (or comment if there are issues)?
>
Sorry.
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2020-03-02 14:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-11 9:31 [Xen-devel] [PATCH] xen: do live patching only from main idle loop Juergen Gross
2020-02-12 9:46 ` Jan Beulich
2020-02-18 5:41 ` Tian, Kevin
2020-02-24 22:25 ` Julien Grall
2020-02-26 14:17 ` Jürgen Groß
2020-02-27 21:51 ` Julien Grall
2020-03-02 14:28 ` Jan Beulich
2020-03-02 14:41 ` Ross Lagerwall [this message]
2020-03-02 18:34 ` Konrad Rzeszutek Wilk
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=680f7622-3e4b-1049-cecc-527910739ca9@citrix.com \
--to=ross.lagerwall@citrix.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=julien@xen.org \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=konrad.wilk@oracle.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.org \
--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).