From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH 07/10] Move irq notifiers lists to its own locking. Date: Sun, 9 Aug 2009 17:49:54 +0300 Message-ID: <20090809144954.GR4764@redhat.com> References: <1249821671-32356-1-git-send-email-gleb@redhat.com> <1249821671-32356-8-git-send-email-gleb@redhat.com> <4A7EE2AE.3020300@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]:48119 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750827AbZHIOtz (ORCPT ); Sun, 9 Aug 2009 10:49:55 -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 n79Enuvt028598 for ; Sun, 9 Aug 2009 10:49:56 -0400 Content-Disposition: inline In-Reply-To: <4A7EE2AE.3020300@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Aug 09, 2009 at 05:52:30PM +0300, Avi Kivity wrote: > On 08/09/2009 03:41 PM, Gleb Natapov wrote: >> Signed-off-by: Gleb Natapov >> --- >> include/linux/kvm_host.h | 1 + >> virt/kvm/irq_comm.c | 16 ++++++++-------- >> virt/kvm/kvm_main.c | 1 + >> 3 files changed, 10 insertions(+), 8 deletions(-) >> >> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h >> index ce28cb7..8791ce8 100644 >> --- a/include/linux/kvm_host.h >> +++ b/include/linux/kvm_host.h >> @@ -178,6 +178,7 @@ struct kvm { >> spinlock_t irq_routing_lock; >> struct hlist_head mask_notifier_list; >> struct hlist_head irq_ack_notifier_list; >> + spinlock_t irq_notifier_list_lock; >> > > Again, why? > Because later patches remove irq_lock entirely and lock is need for write even with rcu. So instead of reusing irq_lock to protect those structures on write I introduce locks with self descriptive names. -- Gleb.