From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAXCq-0001X5-IF for qemu-devel@nongnu.org; Wed, 08 Jun 2016 02:43:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAXCm-00059q-Ad for qemu-devel@nongnu.org; Wed, 08 Jun 2016 02:43:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAXCm-00059k-50 for qemu-devel@nongnu.org; Wed, 08 Jun 2016 02:43:08 -0400 References: <1460004984-3784-1-git-send-email-jasowang@redhat.com> <20160530210308-mutt-send-email-mst@redhat.com> <574CFF32.2090005@redhat.com> <20160531041942.GA10021@redhat.com> <574D165F.5000106@redhat.com> <20160607193904.3df382b4@bahia.huguette.org> From: Jason Wang Message-ID: <5757BE75.7040204@redhat.com> Date: Wed, 8 Jun 2016 14:43:01 +0800 MIME-Version: 1.0 In-Reply-To: <20160607193904.3df382b4@bahia.huguette.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V3] tap: vhost busy polling support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz Cc: famz@redhat.com, qemu-devel@nongnu.org, "Michael S. Tsirkin" On 2016=E5=B9=B406=E6=9C=8808=E6=97=A5 01:39, Greg Kurz wrote: > On Tue, 31 May 2016 12:43:11 +0800 > Jason Wang wrote: > >> >On 2016=E5=B9=B405=E6=9C=8831=E6=97=A5 12:19, Michael S. Tsirkin wrot= e: >>> > >On Tue, May 31, 2016 at 11:04:18AM +0800, Jason Wang wrote: >>>> > >> >>>> > >>On 2016=E5=B9=B405=E6=9C=8831=E6=97=A5 02:07, Michael S. Tsirkin= wrote: >>>>> > >>>On Thu, Apr 07, 2016 at 12:56:24PM +0800, Jason Wang wrote: >>>>>> > >>>>This patch add the capability of basic vhost net busy pollin= g which is >>>>>> > >>>>supported by recent kernel. User could configure the maximum= number of >>>>>> > >>>>us that could be spent on busy polling through a new propert= y of tap >>>>>> > >>>>"vhost-poll-us". >>>>> > >>>I applied this but now I had a thought - should we generalize = this to >>>>> > >>>"poll-us"? Down the road tun could support busy olling just li= ke >>>>> > >>>sockets do. >>>> > >>Looks two different things. Socket busy polling depends on the v= alue set by >>>> > >>sysctl or SO_BUSY_POLL, which should be transparent to qemu. >>> > >This is what I am saying. qemu can set SO_BUSY_POLL if poll-us is= specified, >>> > >can it not? >> > >> >With CAP_NET_ADMIN, it can. Without it, it can only decrease the valu= e. >> > >>> > > Onthe one hand this suggests a more generic name >>> > >for the option. >> > >> >I see, but there're some differences: >> > >> >- socket busy polling only poll for rx, vhost busy polling poll for b= oth >> >tx and rx. >> >- vhost busy polling does not depends on socket busy polling, it can >> >work with socket busy polling disabled. >> > > FWIW since these are different things, maybe the user would want to use > both (?)... in which case a single API could be painful. > Yes, but since technically we can do busy polling from qemu, so I will=20 post a patch on top to change the name to "poll-us" instead. For now, we=20 will ignore this for userspace network, we may want to add it in the futu= re. Thanks