From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH 0/5][RFC] more fine grained locking for IRQ injection Date: Mon, 13 Jul 2009 18:21:24 +0300 Message-ID: <20090713152124.GM23086@redhat.com> References: <1247476355-27284-1-git-send-email-gleb@redhat.com> <20090713132335.GB10387@redhat.com> <20090713132809.GM28046@redhat.com> <20090713135315.GH10402@redhat.com> <20090713135858.GP28046@redhat.com> <20090713142148.GI10402@redhat.com> <20090713143312.GR28046@redhat.com> <20090713144315.GK10402@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, avi@redhat.com, mtosatti@redhat.com To: "Michael S. Tsirkin" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:42884 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756106AbZGMPV0 (ORCPT ); Mon, 13 Jul 2009 11:21:26 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n6DFLQws013257 for ; Mon, 13 Jul 2009 11:21:26 -0400 Content-Disposition: inline In-Reply-To: <20090713144315.GK10402@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Jul 13, 2009 at 05:43:15PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 13, 2009 at 05:33:12PM +0300, Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 05:21:48PM +0300, Michael S. Tsirkin wrote: > > > On Mon, Jul 13, 2009 at 04:58:58PM +0300, Gleb Natapov wrote: > > > > On Mon, Jul 13, 2009 at 04:53:15PM +0300, Michael S. Tsirkin wrote: > > > > > On Mon, Jul 13, 2009 at 04:28:09PM +0300, Gleb Natapov wrote: > > > > > > On Mon, Jul 13, 2009 at 04:23:36PM +0300, Michael S. Tsirkin wrote: > > > > > > > On Mon, Jul 13, 2009 at 12:12:30PM +0300, Gleb Natapov wrote: > > > > > > > > kvm->irq_lock protects too much stuff, but still fail to protect > > > > > > > > everything it was design to protect (see ack notifiers call in pic). I > > > > > > > > want to make IRQ injection logic use more fine grained locking. > > > > > > > > > > > > > > At least irq routing changes and notifier list changes > > > > > > > do not seem to be involved in irq injection. > > > > > > > So why do we want fine-grained locking there? > > > > > > > > > > > > > When you have one big lock and you want to eliminate it you look at all > > > > > > things it protects and you start introducing different locking for > > > > > > unrelated stuff. This is what this patch series does, so I don't really > > > > > > get you point. > > > > > > > > > > But why do you want to eliminate it? What is the operation that this > > > > > will speed up? Is there a contention issue and which operations > > > > > contend on the lock? > > > > > > > > > Interrupt injection. I want to be able to inject interrupts without the > > > > lock at all. > > > > > > You are talking about the lapic changes below, right? OK. But how do > > > the other changes help, specifically? I'm less familiar with ioapic, but > > > I think irq routing and irq notifier list changes are done off data > > > path. > > > > > irq_routing is accessed on irq injection path, so making in lockless is > > necessary to achieve the goal. Making ack notifiers lockless removes one > > lock from EOI path. > > But this is done with RCU patches, right? > No, not right. Only rcu patch is meaningless since irq injection is still done under irq_lock. Look at the whole series, not each line by itself. -- Gleb.