From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0PZK-00042w-KI for qemu-devel@nongnu.org; Fri, 27 Jun 2014 02:23:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0PZE-0003Tz-Df for qemu-devel@nongnu.org; Fri, 27 Jun 2014 02:23:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0PZE-0003Tv-6j for qemu-devel@nongnu.org; Fri, 27 Jun 2014 02:23:24 -0400 Date: Fri, 27 Jun 2014 08:23:18 +0200 From: Kevin Wolf Message-ID: <20140627062318.GA5223@noname.redhat.com> References: <53AC3C72.6080308@redhat.com> <53AC3F8E.20808@redhat.com> <53AC42DA.2000703@redhat.com> <53ACFA2E.8080901@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53ACFA2E.8080901@redhat.com> Subject: Re: [Qemu-devel] [regression] dataplane: throughout -40% by commit 580b6b2aa2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Ming Lei , Fam Zheng , qemu-devel@nongnu.org, Stefan Hajnoczi , "Michael S. Tsirkin" Am 27.06.2014 um 06:59 hat Paolo Bonzini geschrieben: > Il 27/06/2014 03:15, Ming Lei ha scritto: > >On Thu, Jun 26, 2014 at 11:57 PM, Paolo Bonzini wrote: > >>We can implement (advisory) calls like bdrv_plug/bdrv_unplug in order to > >>restore the previous levels of performance. > > > >Yes, that is also what I am thinking, or interfaces like bdrv_queue_io() > >and bdrv_submit_io(), which may match with aio interfaces. > > Would you like to try preparing a patch? Note that there is already an interface in block.c that takes multiple requests at once, bdrv_aio_multiwrite(). It is currently used by virtio-blk, even though not in dataplane mode. It also submits individual requests to the block drivers currently, so effectively it doesn't make a difference, just the problem occurs in the block layer instead of the device. We should either improve bdrv_aio_multiwrite() to submit the requests in a batch to the block drivers, add a bdrv_aio_multiwrite() and use it for dataplane as well (possibly with a flag for disabling the request merging if we want to keep the current behaviour for dataplane); or, if we consider it a bad interface, replace it altogether with the new thing even for normal virtio-blk. If this makes a difference for dataplane, it probably makes a difference for all block devices. Kevin