[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171002124811.fryss7fdgghuwopg@hirez.programming.kicks-ass.net>
Date: Mon, 2 Oct 2017 14:48:11 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Marcelo Tosatti <mtosatti@...hat.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
mingo@...hat.com, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [patch 3/3] x86: kvm guest side support for KVM_HC_RT_PRIO
hypercall\
On Mon, Oct 02, 2017 at 02:30:33PM +0200, Paolo Bonzini wrote:
> I don't understand why is it correct to delay interrupt injection just
> because VCPU0 is running in a spinlock-protected region? I just cannot
> see the reason why it's safe and not a recipe for priority inversions.
It is indeed not right. Something like:
raw_spin_lock(&some_lock);
/* do crud */
raw_spin_unlock(&some_lock);
Should not hold off the interrupt that tells you your finger is in
imminent danger of becoming detached. Only when we do
local_irq_disable() (ie. raw_spin_lock_irq*() and the like) should we
avoid interrupt delivery.
This whole fixation on spinlock regions is misguided and must stop, its
wrong on all levels.
Powered by blists - more mailing lists