From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4ZOg-000772-N3 for qemu-devel@nongnu.org; Tue, 08 Jul 2014 13:41:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4ZOX-0007Yk-LD for qemu-devel@nongnu.org; Tue, 08 Jul 2014 13:41:42 -0400 Received: from mail-qa0-x233.google.com ([2607:f8b0:400d:c00::233]:61911) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4ZOX-0007Yf-HN for qemu-devel@nongnu.org; Tue, 08 Jul 2014 13:41:33 -0400 Received: by mail-qa0-f51.google.com with SMTP id j7so5087557qaq.24 for ; Tue, 08 Jul 2014 10:41:33 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53BC2D47.9080605@redhat.com> Date: Tue, 08 Jul 2014 19:41:27 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1404834310-12856-1-git-send-email-ming.lei@canonical.com> In-Reply-To: <1404834310-12856-1-git-send-email-ming.lei@canonical.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] linux-aio: fix submit aio as a batch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ming Lei , Peter Maydell , qemu-devel@nongnu.org, Stefan Hajnoczi Cc: Kevin Wolf , Fam Zheng , "Michael S. Tsirkin" Il 08/07/2014 17:45, Ming Lei ha scritto: > > - /* empty io queue */ > - s->io_q.idx = 0; > + ret = io_submit(s->ctx, len, s->io_q.iocbs); > + if (ret == -EAGAIN) { > + event_notifier_set(&s->retry); > + return 0; You can use a bottom half instead of this event notifier. Paolo