Received: from eggs.gnu.org ([2001:4830:134:3::10]:50799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xyid2-0007MN-G5 for qemu-devel@nongnu.org; Wed, 10 Dec 2014 09:52:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xyicw-000127-BZ for qemu-devel@nongnu.org; Wed, 10 Dec 2014 09:52:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xyick-0000wM-Qp for qemu-devel@nongnu.org; Wed, 10 Dec 2014 09:52:30 -0500 From: Paolo Bonzini Date: Wed, 10 Dec 2014 15:51:58 +0100 Message-Id: <1418223122-22481-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 0/4] linux-aio: rewrite and simplify queuing code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, ming.lei@canonical.com, pl@kamp.de, stefanha@redhat.com This series rewrites the io_submit code to avoid having to synchronize the iocbs in two places (qemu_laiocb and LaioQueue). Instead, the queue of pending I/O requests is kept in a list. This fixes the problems with io_submit doing partial submissions or failing with EAGAIN, without complicating the code. The bug is shown by "qemu-img bench -n -t none -s 65536 -d 1024 -c 100000" pretty much instantly. Paolo Paolo Bonzini (4): linux-aio: queue requests that cannot be submitted linux-aio: track whether the queue is blocked linux-aio: rename LaioQueue idx field to "n" linux-aio: simplify removal of completed iocbs from the list block/linux-aio.c | 86 +++++++++++++++++++++++++--------------------------- include/qemu/queue.h | 11 +++++++ 2 files changed, 53 insertions(+), 44 deletions(-) -- 2.1.0