From: "Michael S. Tsirkin" Subject: Re: virtio-blk performance and MSI Date: Sun, 9 Aug 2009 22:56:42 +0300 Message-ID: <20090809195642.GB21703@redhat.com> References: <20090806163549.GA25594@lst.de> <4A7E9E7F.2090901@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , Anthony Liguori , kvm@vger.kernel.org, qemu-devel@nongnu.org To: Avi Kivity Return-path: Received: from mx2.redhat.com ([66.187.237.31]:36855 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752637AbZHIT54 (ORCPT ); Sun, 9 Aug 2009 15:57:56 -0400 Content-Disposition: inline In-Reply-To: <4A7E9E7F.2090901@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Aug 09, 2009 at 01:01:35PM +0300, Avi Kivity wrote: > On 08/06/2009 07:35 PM, Christoph Hellwig wrote: >> Michael suggested to me a while ago to try MSI with virtio-blk and I >> played with this small patch: >> >> >> Index: qemu-kvm/hw/virtio-blk.c >> =================================================================== >> --- qemu-kvm.orig/hw/virtio-blk.c >> +++ qemu-kvm/hw/virtio-blk.c >> @@ -416,6 +416,7 @@ VirtIODevice *virtio_blk_init(DeviceStat >> s->vdev.get_config = virtio_blk_update_config; >> s->vdev.get_features = virtio_blk_get_features; >> s->vdev.reset = virtio_blk_reset; >> + s->vdev.nvectors = 2; some whitespace damage btw >> s->bs = bs; >> s->rq = NULL; >> if (strlen(ps = (char *)drive_get_serial(bs))) >> >> which gave about 5% speedups on 4k sized reads and writes, see the full >> iozone output I attached. Now getting the information about using >> multiple MSI vectors from the command line to virtio-blk similar to how >> virtio-net does seems extremly messy right now. Waiting for Gerd's >> additional qdev patches to make it easier as a qdev property. >> >> > > Looks good. Anthony, I think this applies upstream? This applies upstream, but we also need the flag to change # of vectors: for loading old images, but also for troubleshooting. Thus the qdev dependency. -- MST