From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [Qemu-devel] [RFC] Replace posix-aio with custom thread pool Date: Fri, 12 Dec 2008 08:35:57 -0600 Message-ID: <494276CD.6060904@codemonkey.ws> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Gerd Hoffmann , qemu-devel@nongnu.org, kvm-devel To: Andrea Arcangeli Return-path: Received: from mail-gx0-f12.google.com ([209.85.217.12]:45931 "EHLO mail-gx0-f12.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756850AbYLLOgD (ORCPT ); Fri, 12 Dec 2008 09:36:03 -0500 Received: by gxk5 with SMTP id 5so919695gxk.13 for ; Fri, 12 Dec 2008 06:36:01 -0800 (PST) In-Reply-To: <20081212142435.GL6809@random.random> Sender: kvm-owner@vger.kernel.org List-ID: 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. >