Received: from eggs.gnu.org ([2001:4830:134:3::10]:41621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUTKP-0003mI-8w for qemu-devel@nongnu.org; Tue, 02 Aug 2016 02:37:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUTKJ-0008V9-Ow for qemu-devel@nongnu.org; Tue, 02 Aug 2016 02:37:24 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:38881 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUTKJ-0008V3-IF for qemu-devel@nongnu.org; Tue, 02 Aug 2016 02:37:19 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u726Xvvj119546 for ; Tue, 2 Aug 2016 02:37:19 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0b-001b2d01.pphosted.com with ESMTP id 24gnv1krgu-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 02 Aug 2016 02:37:18 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 2 Aug 2016 07:37:17 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 9556B2190046 for ; Tue, 2 Aug 2016 07:36:41 +0100 (BST) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u726bFsR24183194 for ; Tue, 2 Aug 2016 06:37:15 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u726bFus028682 for ; Tue, 2 Aug 2016 00:37:15 -0600 Date: Tue, 2 Aug 2016 08:37:13 +0200 From: Cornelia Huck In-Reply-To: <633c8858-ea7d-0ed1-538f-e6c4eaf160c6@redhat.com> References: <1470038878-5599-1-git-send-email-jasowang@redhat.com> <20160801200029.30da2f30.cornelia.huck@de.ibm.com> <633c8858-ea7d-0ed1-538f-e6c4eaf160c6@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Message-Id: <20160802083713.10f06635.cornelia.huck@de.ibm.com> Subject: Re: [Qemu-devel] [PATCH] vhost: don't set vring call if no vector List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: mst@redhat.com, qemu-devel@nongnu.org On Tue, 2 Aug 2016 10:39:22 +0800 Jason Wang wrote: > On 2016=E5=B9=B408=E6=9C=8802=E6=97=A5 02:00, Cornelia Huck wrote: > > On Mon, 1 Aug 2016 16:07:58 +0800 > > Jason Wang wrote: > >> + if (k->query_guest_notifiers && > >> + k->query_guest_notifiers(qbus->parent) && > >> + virtio_queue_vector(vdev, idx) =3D=3D VIRTIO_NO_VECTOR) { > > I'm trying to imagine what this means for virtio-ccw. Keep in mind that > > we don't have the concept of setting a 'vector' by the OS (the vector > > is setup internally to the queue index and the OS does not see it.) > > > > ->query_guest_notifiers() is true if the OS has enabled the subchannel > > of the proxy device (i.e., if it is enabled for doing *anything* with > > the subchannel, regardless whether the OS wants to be notified or is > > planning to poll.) The second condition will never hold true for any > > valid queue once the OS has setup the queues. >=20 > I see, so If I understand correctly, there's no way to detect whether or= =20 > not guest will use a specific virtqueue interrupt? Yes. The guest will either be notified for any virtqueue (if it registered indicators; this is always done for every vq of the device at once), or for none. >=20 > > > > So this won't break anything for virtio-ccw AFAICS, but I don't think > > we gain anything. >=20 > Yes, but if we could infer whether or not polling is used in the driver,= =20 > this is probably all we can do for ccw. What we could do is check whether the driver has registed indicators and disable setting up notification for any vq of the device if not. But I'm not sure an always-polling driver is worth optimizing for.