From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUK5u-0001Rs-FO for qemu-devel@nongnu.org; Mon, 11 Jan 2010 08:14:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUK5q-0001R7-Fy for qemu-devel@nongnu.org; Mon, 11 Jan 2010 08:14:06 -0500 Received: from [199.232.76.173] (port=46957 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUK5q-0001R4-0I for qemu-devel@nongnu.org; Mon, 11 Jan 2010 08:14:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47051) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUK5p-0001uT-LQ for qemu-devel@nongnu.org; Mon, 11 Jan 2010 08:14:01 -0500 Message-ID: <4B4B2411.7030301@redhat.com> Date: Mon, 11 Jan 2010 15:13:53 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [RFC][PATCH] performance improvement for windows guests, running on top of virtio block device References: <1263195647.2005.44.camel@localhost> <4B4AE1BD.4000400@redhat.com> <4B4AE95D.7080305@redhat.com> <4B4AED19.3060401@redhat.com> <20100111131119.GB24241@lst.de> In-Reply-To: <20100111131119.GB24241@lst.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: Dor Laor , qemu-devel , Vadim Rozenfeld On 01/11/2010 03:11 PM, Christoph Hellwig wrote: > FYI below is the manually applied patch without all the wrapping: > static void virtio_blk_req_complete(VirtIOBlockReq *req, int status) > { > VirtIOBlock *s = req->dev; > @@ -95,6 +98,12 @@ static void virtio_blk_req_complete(Virt > virtqueue_push(s->vq,&req->elem, req->qiov.size + sizeof(*req->in)); > virtio_notify(&s->vdev, s->vq); > > + if (--s->pending == 0) { > + virtio_queue_set_notification(s->vq, 1); > + virtio_blk_handle_output(&s->vdev, s->vq); > + } > + > As Dor points out, the call to virtio_blk_handle_output() wants to be before the test for pending, so we scan the ring as early as possible -- error compiling committee.c: too many arguments to function