From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [KVM PATCH v6 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface Date: Wed, 01 Jul 2009 12:44:39 +0300 Message-ID: <4A4B3007.7080303@redhat.com> References: <20090629153627.31959.76947.stgit@dev.haskins.net> <20090629154415.31959.2666.stgit@dev.haskins.net> <20090629161159.GB22029@redhat.com> <4A48F148.5030501@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Michael S. Tsirkin" , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, davidel@xmailserver.org To: Gregory Haskins Return-path: In-Reply-To: <4A48F148.5030501@novell.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 06/29/2009 07:52 PM, Gregory Haskins wrote: > >> One idea I had to make it even clearer was to have a shutdown list >> of irqfds per-kvm, together with the items list, and make work_struct for >> shutdown global, not per-irqfd. We can then unconditionally do >> list_move + schedule_work to shut down an irqfd, and it's safe to do >> even if it is already on the shutdown list - it just gets moved to tail. >> >> > > Hmm..I'm not sure that churn really buys us anything, tho. Technically > the "active" bit is redundant with list_del_init()+list_empty() that I > employed in previous versions. However, I made it explicit with the > active bit to be more self-documenting. IMO, the latest code is pretty > clear, and the change you are proposing is moving towards a slightly > trickier variant like I originally had. I'd say "lets leave this as is". > Could retain self documentation by introducing a helper irqfd_active() which does the list_blah() magic. -- error compiling committee.c: too many arguments to function