From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ycm1r-0000aS-7b for qemu-devel@nongnu.org; Mon, 30 Mar 2015 22:35:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ycm1k-0007xi-2Z for qemu-devel@nongnu.org; Mon, 30 Mar 2015 22:35:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ycm1j-0007xO-KT for qemu-devel@nongnu.org; Mon, 30 Mar 2015 22:35:39 -0400 Date: Tue, 31 Mar 2015 10:34:56 +0800 From: Jason Wang Message-Id: <1427769296.11302.2@smtp.corp.redhat.com> In-Reply-To: <20150320112005.12d9ea52.cornelia.huck@de.ibm.com> References: <1426671309-13645-1-git-send-email-jasowang@redhat.com> <1426671309-13645-10-git-send-email-jasowang@redhat.com> <20150320112005.12d9ea52.cornelia.huck@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Subject: Re: [Qemu-devel] [PATCH V4 09/19] virito: introduce bus specific queue limit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: mst@redhat.com, Alexander Graf , qemu-devel@nongnu.org, Christian Borntraeger , Paolo Bonzini , Richard Henderson On Fri, Mar 20, 2015 at 6:20 PM, Cornelia Huck wrote: > On Wed, 18 Mar 2015 17:34:59 +0800 > Jason Wang wrote: > > Typo in subject: s/virito/virtio/ Will correct this. > > >> This patch introduces a bus specific queue limitation. It will be >> useful for increasing the limit for one of the bus without >> disturbing >> other buses. >> >> Cc: Michael S. Tsirkin >> Cc: Alexander Graf >> Cc: Richard Henderson >> Cc: Cornelia Huck >> Cc: Christian Borntraeger >> Cc: Paolo Bonzini >> Signed-off-by: Jason Wang >> --- >> hw/char/virtio-serial-bus.c | 2 +- >> hw/net/virtio-net.c | 4 ++-- >> hw/s390x/s390-virtio-bus.c | 1 + >> hw/s390x/virtio-ccw.c | 1 + >> hw/scsi/virtio-scsi.c | 4 ++-- >> hw/virtio/virtio-mmio.c | 1 + >> hw/virtio/virtio-pci.c | 1 + >> hw/virtio/virtio.c | 40 >> +++++++++++++++++++++++++--------------- >> include/hw/virtio/virtio-bus.h | 1 + >> include/hw/virtio/virtio.h | 1 + >> 10 files changed, 36 insertions(+), 20 deletions(-) > >> diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c >> index 047c963..2b41e32 100644 >> --- a/hw/s390x/s390-virtio-bus.c >> +++ b/hw/s390x/s390-virtio-bus.c >> @@ -715,6 +715,7 @@ static void >> virtio_s390_bus_class_init(ObjectClass *klass, void *data) >> bus_class->max_dev = 1; >> k->notify = virtio_s390_notify; >> k->get_features = virtio_s390_get_features; >> + k->queue_max = VIRTIO_PCI_QUEUE_MAX; > > I'm wondering whether we should initialize queue_max to smth like > VIRTIO_QUEUE_MAX_DEFAULT (== 64) in virtio-bus.c instead and have the > individual classes override that value once they want to use a > different value? May work now, but consider in the future, each transport will finally have their own limitation, so VIRTIO_QUEUE_MAX_DEFAULT will finally be removed some day. > > > But I'm fine with this patch as it stands as well. Thanks, so I will keep this patch as is. > >> } >