[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen: do live patching only from main idle loop

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@xxxxxxxx>
> ---
>  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)?


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.