From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LB97b-0005Rc-QE for qemu-devel@nongnu.org; Fri, 12 Dec 2008 09:36:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LB97a-0005RI-HI for qemu-devel@nongnu.org; Fri, 12 Dec 2008 09:36:03 -0500 Received: from [199.232.76.173] (port=50355 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LB97a-0005RE-EM for qemu-devel@nongnu.org; Fri, 12 Dec 2008 09:36:02 -0500 Received: from mail-gx0-f17.google.com ([209.85.217.17]:45607) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LB97Z-0004oi-V7 for qemu-devel@nongnu.org; Fri, 12 Dec 2008 09:36:02 -0500 Received: by gxk10 with SMTP id 10so1717684gxk.10 for ; Fri, 12 Dec 2008 06:36:01 -0800 (PST) Message-ID: <494276CD.6060904@codemonkey.ws> Date: Fri, 12 Dec 2008 08:35:57 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool References: <1228512061-25398-1-git-send-email-aliguori@us.ibm.com> <493E941D.4000608@redhat.com> <493E965E.5050701@us.ibm.com> <20081210164401.GF18814@random.random> <493FFAB6.2000106@codemonkey.ws> <493FFC8E.9080802@redhat.com> <49400F69.8080707@codemonkey.ws> <20081210190810.GG18814@random.random> <20081212142435.GL6809@random.random> In-Reply-To: <20081212142435.GL6809@random.random> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrea Arcangeli Cc: Gerd Hoffmann , kvm-devel , qemu-devel@nongnu.org Andrea Arcangeli wrote: > On Wed, Dec 10, 2008 at 08:08:10PM +0100, Andrea Arcangeli wrote: > >> On Wed, Dec 10, 2008 at 12:50:17PM -0600, Anthony Liguori wrote: >> >>> But opening twice means that you lose coherency with NFS. >>> >> Not sure why. They're not running from different nfs clients. If this >> > > I just got confirmation from Trond that from nfs point of view, > opening the file multiple times or duping it, is the same as I > expected (all it matters is that the inode is the same so the > pagecache radix tree is the same etc..). So opening the file each time > a thread starts, I've been thinking about this, the problems I see are: 1) It's impossible to accept a file descriptor for a block device (possibly not a problem) 2) You'd have to open all the file descriptors at once. Otherwise, you get really strange behavior if the file gets deleted while the guest is running (for instance, with -snapshot). Regards, Anthony Liguori > would provide a local f_pos and it would work fine on > older/current kernels too. In theory other nfs clients should also > behave. Not sure what's best, if to hack around the bdrv api and open > the file multiple times or wait for preadv/pwritev. >