From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH] Move irq routing data structure to rcu locking Date: Sun, 12 Jul 2009 13:07:01 +0300 Message-ID: <20090712100701.GY28046@redhat.com> References: <20090709131332.GW28046@redhat.com> <4A59B1CD.4070406@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mx2.redhat.com ([66.187.237.31]:35497 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751560AbZGLKHE (ORCPT ); Sun, 12 Jul 2009 06:07:04 -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 n6CA73vm004566 for ; Sun, 12 Jul 2009 06:07:03 -0400 Content-Disposition: inline In-Reply-To: <4A59B1CD.4070406@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Jul 12, 2009 at 12:50:05PM +0300, Avi Kivity wrote: > On 07/09/2009 04:13 PM, Gleb Natapov wrote: >> Change it from list to array to make RCU handling simpler. >> >> Signed-off-by: Gleb Natapov >> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h >> index f54a0d3..12d8d2b 100644 >> --- a/include/linux/kvm_host.h >> +++ b/include/linux/kvm_host.h >> @@ -161,7 +161,8 @@ struct kvm { >> >> struct mutex irq_lock; >> #ifdef CONFIG_HAVE_KVM_IRQCHIP >> - struct list_head irq_routing; /* of kvm_kernel_irq_routing_entry */ >> + struct kvm_kernel_irq_routing_entry *irq_routing; >> + spinlock_t irq_routing_lock; >> struct hlist_head mask_notifier_list; >> #endif >> > > Why the new lock? > Currently routing table is protected by irq_lock mutex, but irq_lock is overused. It protects too much of unrelated things and it is not clear what its real purpose in life. I want to rid of it completely. -- Gleb.