From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvYyP-00079Y-De for qemu-devel@nongnu.org; Mon, 22 Aug 2011 14:11:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QvYyO-0007nF-Ct for qemu-devel@nongnu.org; Mon, 22 Aug 2011 14:11:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvYyO-0007kE-3L for qemu-devel@nongnu.org; Mon, 22 Aug 2011 14:11:44 -0400 Message-ID: <4E529C90.20201@redhat.com> Date: Mon, 22 Aug 2011 20:14:40 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1312876010-15361-1-git-send-email-freddy77@gmail.com> In-Reply-To: <1312876010-15361-1-git-send-email-freddy77@gmail.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 00/15] qcow/qcow2 cleanups List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Frediano Ziglio Cc: qemu-devel@nongnu.org Am 09.08.2011 09:46, schrieb Frediano Ziglio: > These patches mostly cleanup some AIO code using coroutines. > Mostly they use stack instead of allocated AIO structure. > Feel free to collapse it too short. > > Frediano Ziglio (15): > qcow: allocate QCowAIOCB structure using stack > qcow: QCowAIOCB field cleanup > qcow: move some blocks of code to avoid useless variable > initialization > qcow: embed qcow_aio_read_cb into qcow_co_readv and qcow_aio_write_cb > into qcow_co_writev > qcow: remove old #undefined code > qcow2: removed unused fields > qcow2: removed cur_nr_sectors field in QCowAIOCB > qcow2: remove l2meta from QCowAIOCB > qcow2: remove cluster_offset from QCowAIOCB > qcow2: remove common from QCowAIOCB > qcow2: reindent and use while before the big jump > qcow2: removed QCowAIOCB entirely > qcow2: remove memory leak > qcow2: small math optimization > qcow2: small optimization > > block/qcow.c | 378 ++++++++++++++------------------------------ > block/qcow2-refcount.c | 16 +-- > block/qcow2.c | 412 +++++++++++++++++++---------------------------- > 3 files changed, 294 insertions(+), 512 deletions(-) Can you please rebase this series to current master? I expect that most conflicts are related to the qemu_malloc -> g_malloc change, so they should be easy to fix. One thing I noticed when reading the first two patches is that there is some state in ACBs that previously was shared across multiple requests (e.g. the bounce buffer for encryption). It is no longer shared after you move the ACB to the stack, so each request allocates a new buffer. Have you checked if this makes a noticeable difference in performance for encrypted images? Kevin