From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [UNTESTED] KVM: do not call kvm_set_irq from irq disabled section Date: Wed, 21 Apr 2010 20:58:48 +0300 Message-ID: <20100421175848.GB2455@redhat.com> References: <20100420155401.GA12982@amt.cnet> <201004211548.12824.sheng.yang@intel.com> <20100421155840.GA22052@amt.cnet> <20100421171227.GB10744@redhat.com> <20100421173734.GA27425@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Yang, Sheng" , kvm , "bonenkamp@gmx.de" , Chris Wright To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:12643 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751813Ab0DUR6y (ORCPT ); Wed, 21 Apr 2010 13:58:54 -0400 Content-Disposition: inline In-Reply-To: <20100421173734.GA27425@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Apr 21, 2010 at 02:37:34PM -0300, Marcelo Tosatti wrote: > On Wed, Apr 21, 2010 at 08:12:27PM +0300, Gleb Natapov wrote: > > On Wed, Apr 21, 2010 at 12:58:41PM -0300, Marcelo Tosatti wrote: > > > > Or could we make kvm_set_irq() atomic? Though the code path is a little long > > > > for spinlock. > > > > > > Yes, given the sleep-inside-RCU-protected section bug from > > > kvm_notify_acked_irq, either that or convert IRQ locking to SRCU. > > > > > > But as you said, the code paths are long and potentially slow, so > > > probably SRCU is a better alternative. > > > > > > Gleb? > > kvm_set_irq() was converted to rcu from mutex to make msix interrupt > > injection scalable. > > We meant ioapic lock. See the last report from Ralf on this thread. Can we solve the problem by calling ack notifier outside rcu read section in kvm_notify_acked_irq()? -- Gleb.