From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MXbzK-00024S-Mm for qemu-devel@nongnu.org; Sun, 02 Aug 2009 10:24:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MXbzF-00024E-2r for qemu-devel@nongnu.org; Sun, 02 Aug 2009 10:24:37 -0400 Received: from [199.232.76.173] (port=39189 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXbzE-00024B-UR for qemu-devel@nongnu.org; Sun, 02 Aug 2009 10:24:32 -0400 Received: from mx2.redhat.com ([66.187.237.31]:49530) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MXbzE-0001Q4-G7 for qemu-devel@nongnu.org; Sun, 02 Aug 2009 10:24:32 -0400 Message-ID: <4A75A242.9020005@redhat.com> Date: Sun, 02 Aug 2009 17:27:14 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] RFC: Add new block driver for the VDI format References: <4A4E5AFC.4020206@mail.berlios.de> <4A51FE07.2040307@codemonkey.ws> In-Reply-To: <4A51FE07.2040307@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Kevin Wolf , QEMU Developers , Christoph Hellwig On 07/06/2009 04:37 PM, Anthony Liguori wrote: > > I'd really like to get rid of synchronous IO functions in the block > layer. One way to do this is to insist that all new block drivers > only implement the AIO functions. > > I think we should make this decree but I'd like to know if other > people think this is unreasonable first. One potential model of block > drivers would involve synchronous IO and threads. I'm not a big fan > of that model and I don't think it's an easy conversion from today's > synchronous IO drivers to that model because the locking and > re-entrance needs careful consideration. > I agree that sync+threads is not easy, but well performing async is much, much harder. Consider that qcow2 still has synchronous operations, and that eliminating the RMW when writing a partial cluster concurrently (a very common operation with 64K clusters) is very hard to do ayncly and much easier syncly. Given in addition the large numbers of format drivers, I think we should prefer sync+threads over trying to convert all format drivers to full async. -- error compiling committee.c: too many arguments to function