From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] Move irq routing data structure to rcu locking Date: Sun, 12 Jul 2009 14:10:19 +0300 Message-ID: <4A59C49B.1030408@redhat.com> References: <20090709131332.GW28046@redhat.com> <4A59B1CD.4070406@redhat.com> <20090712100701.GY28046@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx2.redhat.com ([66.187.237.31]:57836 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753599AbZGLLHY (ORCPT ); Sun, 12 Jul 2009 07:07:24 -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 n6CB7OOm016003 for ; Sun, 12 Jul 2009 07:07:24 -0400 In-Reply-To: <20090712100701.GY28046@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 07/12/2009 01:07 PM, Gleb Natapov wrote: > 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. > Separate discussion/patch. -- error compiling committee.c: too many arguments to function