From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X35is-0006Pr-Qv for qemu-devel@nongnu.org; Fri, 04 Jul 2014 11:48:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X35ii-0003cx-PR for qemu-devel@nongnu.org; Fri, 04 Jul 2014 11:48:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46672) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X35ii-0003cn-HX for qemu-devel@nongnu.org; Fri, 04 Jul 2014 11:48:16 -0400 Message-ID: <53B6CCB7.2070009@redhat.com> Date: Fri, 04 Jul 2014 17:48:07 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1404476854-23773-1-git-send-email-ming.lei@canonical.com> <1404476854-23773-3-git-send-email-ming.lei@canonical.com> <53B6A428.7030800@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] virtio-blk: dataplane: notify guest as a batch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ming Lei Cc: Kevin Wolf , Peter Maydell , Fam Zheng , "Michael S. Tsirkin" , qemu-devel , Stefan Hajnoczi Il 04/07/2014 16:52, Ming Lei ha scritto: >> > What you can do is change notify_guest to something like >> > >> > qemu_bh_schedule(req->dev->dataplane->notify_guest_bh); >> > >> > and do the actual notification in the bottom half. This should ensure that >> > multiple notifications are coalesced, but it may also introduce new >> > aio_notify calls even with my patch (a BH scheduled from a BH currently does >> > an aio_notify; this can be fixed). > I think we can do better than above because one aio IO completes lots of > requests, and we just need to notify guest for all these requests. Exactly, there would be just one BH and thus just one notify. Paolo