From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kfeh4-000653-6b for qemu-devel@nongnu.org; Tue, 16 Sep 2008 13:50:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kfeh2-00064m-Pk for qemu-devel@nongnu.org; Tue, 16 Sep 2008 13:50:29 -0400 Received: from [199.232.76.173] (port=45887 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kfeh2-00064j-Ll for qemu-devel@nongnu.org; Tue, 16 Sep 2008 13:50:28 -0400 Received: from yx-out-1718.google.com ([74.125.44.156]:32885) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kfeh2-000072-BR for qemu-devel@nongnu.org; Tue, 16 Sep 2008 13:50:28 -0400 Received: by yx-out-1718.google.com with SMTP id 3so811790yxi.82 for ; Tue, 16 Sep 2008 10:50:27 -0700 (PDT) Message-ID: Date: Tue, 16 Sep 2008 20:50:27 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] [PATCH] Refactor AIO to allow multiple AIO implementations In-Reply-To: <1221582247-8886-1-git-send-email-aliguori@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1221582247-8886-1-git-send-email-aliguori@us.ibm.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , Ryan Harper , kvm@vger.kernel.org On 9/16/08, Anthony Liguori wrote: > This patch refactors the AIO layer to allow multiple AIO implementations. It's > only possible because of the recent signalfd() patch. > +/* This is a simple lock used to protect the aio_handlers list. Specifically, > + * it's used to ensure that no callbacks are removed while we're walking and > + * dispatching callbacks. > + */ > +static int walking_handlers; Shouldn't this be volatile and/or atomic_t? Just wondering, why don't you use real locking operations, for example those in qemu-lock.h?