Received: from eggs.gnu.org ([2001:4830:134:3::10]:55464) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dD3FZ-00025g-GQ for qemu-devel@nongnu.org; Tue, 23 May 2017 02:24:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dD3FW-0003Tj-Cp for qemu-devel@nongnu.org; Tue, 23 May 2017 02:24:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49820) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dD3FW-0003T5-3l for qemu-devel@nongnu.org; Tue, 23 May 2017 02:24:54 -0400 References: <1495161139-28757-1-git-send-email-wei.w.wang@intel.com> <20170519233750-mutt-send-email-mst@kernel.org> <5922D0EC.6060405@intel.com> <5923C557.3020301@intel.com> From: Jason Wang Message-ID: Date: Tue, 23 May 2017 14:24:44 +0800 MIME-Version: 1.0 In-Reply-To: <5923C557.3020301@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [virtio-dev] Re: [PATCH RFC] virtio-net: enable configurable tx queue size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wei Wang , "Michael S. Tsirkin" Cc: stefanha@gmail.com, marcandre.lureau@gmail.com, pbonzini@redhat.com, jan.scheurich@ericsson.com, virtio-dev@lists.oasis-open.org, qemu-devel@nongnu.org On 2017=E5=B9=B405=E6=9C=8823=E6=97=A5 13:15, Wei Wang wrote: > On 05/23/2017 10:04 AM, Jason Wang wrote: >> >> >> On 2017=E5=B9=B405=E6=9C=8822=E6=97=A5 19:52, Wei Wang wrote: >>> On 05/20/2017 04:42 AM, Michael S. Tsirkin wrote: >>>> On Fri, May 19, 2017 at 10:32:19AM +0800, Wei Wang wrote: >>>>> This patch enables the virtio-net tx queue size to be configurable >>>>> between 256 (the default queue size) and 1024 by the user. The queu= e >>>>> size specified by the user should be power of 2. >>>>> >>>>> Setting the tx queue size to be 1024 requires the guest driver to >>>>> support the VIRTIO_NET_F_MAX_CHAIN_SIZE feature. >>>> This should be a generic ring feature, not one specific to virtio ne= t. >>> OK. How about making two more changes below: >>> >>> 1) make the default tx queue size =3D 1024 (instead of 256). >> >> As has been pointed out, you need compat the default value too in=20 >> this case. > > The driver gets the size info from the device, then would it cause any > compatibility issue if we change the default ring size to 1024 in the > vhost case? In other words, is there any software (i.e. any virtio-net=20 > driver) > functions based on the assumption of 256 queue size? I don't know. But is it safe e.g we migrate from 1024 to an older qemu=20 with 256 as its queue size? > > For live migration, the queue size that is being used will also be=20 > transferred > to the destination. > >> >>> We can reduce the size (to 256) if the MAX_CHAIN_SIZE feature >>> is not supported by the guest. >>> In this way, people who apply the QEMU patch can directly use the >>> largest queue size(1024) without adding the booting command line. >>> >>> 2) The vhost backend does not use writev, so I think when the vhost >>> backed is used, using 1024 queue size should not depend on the >>> MAX_CHAIN_SIZE feature. >> >> But do we need to consider even larger queue size now? > > Need Michael's feedback on this. Meanwhile, I'll get the next version o= f > code ready and check if larger queue size would cause any corner case. The problem is, do we really need a new config filed for this? Or just=20 introduce a flag which means "I support up to 1024 sgs" is sufficient? > >> >> Btw, I think it's better to draft a spec patch. >> > > I think it should be easier to draft the spec patch when the code is > almost done. Maybe both. Thanks > > > Best, > Wei > > > >