From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KzDDC-00028c-2k for qemu-devel@nongnu.org; Sun, 09 Nov 2008 11:32:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KzDDA-00028D-Kr for qemu-devel@nongnu.org; Sun, 09 Nov 2008 11:32:29 -0500 Received: from [199.232.76.173] (port=53448 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzDDA-00028A-GA for qemu-devel@nongnu.org; Sun, 09 Nov 2008 11:32:28 -0500 Received: from yw-out-1718.google.com ([74.125.46.158]:64225) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KzDDA-0001N5-Ce for qemu-devel@nongnu.org; Sun, 09 Nov 2008 11:32:28 -0500 Received: by yw-out-1718.google.com with SMTP id 6so723223ywa.82 for ; Sun, 09 Nov 2008 08:32:27 -0800 (PST) Message-ID: <49171096.5030205@codemonkey.ws> Date: Sun, 09 Nov 2008 10:32:22 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 0/4] qcow2: Improve cluster refcount update References: <1225990556.6576.10.camel@frecb07144> <49133D17.3050100@codemonkey.ws> <1226047453.4046.4.camel@frecb07144> <491449C4.4070500@codemonkey.ws> <1226070063.4046.56.camel@frecb07144> <491460D2.4060203@codemonkey.ws> <4916F536.1070009@redhat.com> In-Reply-To: <4916F536.1070009@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 Avi Kivity wrote: > Anthony Liguori wrote: >> Laurent Vivier wrote: >>> Le vendredi 07 novembre 2008 à 07:59 -0600, Anthony Liguori a écrit : >>> In all cases #1 is totally useless as it is only cosmetic. >>> >>> #2 improves performance without aligned buffers and with "cache" set to >>> default value. >>> >> >> I'm currently rewriting the block-raw-posix.c O_DIRECT support. I'll >> commit your patches once I finish that. >> >> I'm switching everything to use the aio functions, introducing a >> memory pool so that we can efficiently allocate memory for new >> requests without having unbounded memory allocation, and switching >> all the synchronous functions to use the aio functions. > > What about locking? If clusters are already allocated and we don't > need COW things are simple (and a global lock should suffice, provided > it's released before the io is actually submitted), but are you > planning to parallelize the metadata paths as well? I'm still doing a global lock model and requests submitted while a request is pending is simply queued. There are certainly more effective strategies but this will work for now. My larger goal is to totally eliminate synchronous reads/writes APIs in QEMU. They cause unending pain with the main loop. Regards, Anthony Liguori