All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Mike Galbraith <efault@gmx.de>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-rt-users <linux-rt-users@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [rt-patch 4/3] arm,KVM: Move phys_timer handling to hard irq context
Date: Thu, 2 Aug 2018 12:31:04 -0400	[thread overview]
Message-ID: <20180802123104.7fed73b4@gandalf.local.home> (raw)
In-Reply-To: <1533192980.11791.8.camel@gmx.de>

On Thu, 02 Aug 2018 08:56:20 +0200
Mike Galbraith <efault@gmx.de> wrote:

> (arm-land adventures 1/3 take2 will have to wait, my cup runeth over) 
> 
> v4.14..v4.15 timer handling changes including calling kvm_timer_vcpu_load()

I take it that this should be added to v4.16-rt and marked stable-rt?

-- Steve

> during kvm_preempt_ops.sched_in and taking vgic_dist.lpi_list_lock in the
> timer interrupt handler required locks for which locking rules/context had
> been changed be converted to raw_spinlock_t...
> 
> Quoting virt/kvm/arm/vgic/vgic.c:
>  * Locking order is always:
>  * kvm->lock (mutex)
>  *   its->cmd_lock (mutex)
>  *     its->its_lock (mutex)
>  *       vgic_cpu->ap_list_lock         must be taken with IRQs disabled
>  *         kvm->lpi_list_lock           must be taken with IRQs disabled
>  *           vgic_irq->irq_lock         must be taken with IRQs disabled
>  *
>  * As the ap_list_lock might be taken from the timer interrupt handler,
>  * we have to disable IRQs before taking this lock and everything lower
>  * than it.
> 
> ...and fixed the obvious bricking consequence of those changes for RT,
> but left an RT specific kvm unit test timer failure in its wake.  Handling
> phys_timer in hard interrupt context as expected cures that failure.
> 
> Pre:
> PASS selftest-setup (2 tests)
> PASS selftest-vectors-kernel (2 tests)
> PASS selftest-vectors-user (2 tests)
> PASS selftest-smp (65 tests)
> PASS pci-test (1 tests)
> PASS pmu (3 tests)
> PASS gicv2-ipi (3 tests)
> PASS gicv3-ipi (3 tests)
> PASS gicv2-active (1 tests)
> PASS gicv3-active (1 tests)
> PASS psci (4 tests)
> FAIL timer (8 tests, 1 unexpected failures)
> 
> Post:
> PASS selftest-setup (2 tests)
> PASS selftest-vectors-kernel (2 tests)
> PASS selftest-vectors-user (2 tests)
> PASS selftest-smp (65 tests)
> PASS pci-test (1 tests)
> PASS pmu (3 tests)
> PASS gicv2-ipi (3 tests)
> PASS gicv3-ipi (3 tests)
> PASS gicv2-active (1 tests)
> PASS gicv3-active (1 tests)
> PASS psci (4 tests)
> PASS timer (8 tests)
> 
> Signed-off-by: Mike Galbraith <efault@gmx.de>
> ---
>  virt/kvm/arm/arch_timer.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/virt/kvm/arm/arch_timer.c
> +++ b/virt/kvm/arm/arch_timer.c
> @@ -634,7 +634,7 @@ void kvm_timer_vcpu_init(struct kvm_vcpu
>  	hrtimer_init(&timer->bg_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
>  	timer->bg_timer.function = kvm_bg_timer_expire;
>  
> -	hrtimer_init(&timer->phys_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
> +	hrtimer_init(&timer->phys_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_HARD);
>  	timer->phys_timer.function = kvm_phys_timer_expire;
>  
>  	vtimer->irq.irq = default_vtimer_irq.irq;


  reply	other threads:[~2018-08-02 16:31 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27 21:57 [ANNOUNCE] v4.16.18-rt11 Sebastian Andrzej Siewior
2018-07-28  9:07 ` candidates for @devel-rt localversion-rt++ Mike Galbraith
2018-07-28  9:13   ` [rt-patch 1/3] arm64/acpi/perf: move pmu allocation to an early CPU up hook Mike Galbraith
2018-08-02 13:45     ` [rt-patch 1/3 v2] " Mike Galbraith
2018-07-29  6:55   ` candidates for @devel-rt localversion-rt++ Mike Galbraith
2018-07-29 11:47     ` Mike Galbraith
2018-07-30 16:24       ` Mike Galbraith
2018-07-31 18:28         ` bisected - arm64 kvm unit test failures Mike Galbraith
2018-08-01  5:35           ` Marc Zyngier
2018-08-01  6:02             ` Mike Galbraith
2018-08-01  7:22               ` Marc Zyngier
2018-08-01  7:48                 ` Mike Galbraith
2018-08-01  9:20                 ` Mike Galbraith
2018-08-21 15:34           ` Marc Zyngier
2018-08-22 13:38             ` Mike Galbraith
2018-08-22 13:50               ` Marc Zyngier
2018-08-22 13:57                 ` Mike Galbraith
     [not found] ` <1532764179.9882.14.camel@gmx.de>
2018-07-28  9:07   ` [rt-patch 2/3] sched: Introduce raw_cond_resched_lock() Mike Galbraith
2018-07-28  9:07   ` [rt-patch 3/3] arm, KVM: convert vgic_irq.irq_lock to raw_spinlock_t Mike Galbraith
2018-07-30  9:27     ` Peter Zijlstra
2018-07-30 13:34       ` Mike Galbraith
2018-08-02  6:56     ` [rt-patch 4/3] arm,KVM: Move phys_timer handling to hard irq context Mike Galbraith
2018-08-02 16:31       ` Steven Rostedt [this message]
2018-08-02 16:50         ` Mike Galbraith
2018-08-02 17:43           ` Mike Galbraith
2018-08-04 12:25             ` Mike Galbraith
2018-08-05  4:52               ` Mike Galbraith
2018-08-07 14:46                 ` Sebastian Andrzej Siewior

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=20180802123104.7fed73b4@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=bigeasy@linutronix.de \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.