Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3420036pxj; Mon, 24 May 2021 06:26:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjEcaSkP4vzSvaV+tdZAmxILUP+v8GeLXsh7VQ51CzL1q1/z8ttfpX+r/FfChaqESZgAuP X-Received: by 2002:aa7:d058:: with SMTP id n24mr25786063edo.275.1621862771065; Mon, 24 May 2021 06:26:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621862771; cv=none; d=google.com; s=arc-20160816; b=OC5Xj28zQv2SM/6dXNXiwESqg4/tJDQhExBkOb2PkaVA6vSdb/444+sRrZDpF5vprv E2CxrYMLju9z9Y3/c9NYcnki+s9RkKVRiIRv7xOR5ApoA7rVZ+9WOfh3XaNfhwlOlyow DdG3AiEIzJ/bWi6+w33AsUOnH0963qZoMN8njSpaRU7A9VwUXJ7Ycz5HyOp5gH5y2GRV Hek/yPHVqDyYUEQ4fSfsrmJ2dSSk7N2QP67c4t37T0Ylw0oV2w0QO0zZQNZ8ln1urLKv mQqPrVnqSDKT8MbHOxGClW12A0mLR/mvPChMtetF/Ric9WDKunDqPzLXE/mlGtBgpLwA LpKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4XLlEUkhiAcP2K4ZB+J18mgQ/icUCahgsIUqJqs8aT8=; b=PjNCL5SsumLCcPboMNsd3LBy3FdC88YmWlPfa8DRQ08V0QRWD7nAHofXYtgjx3bzrb i2Wxm9Pay88Bxg/A6GxdfgzxrCjVvpxoXVmXihH+J3XIZpIBsegYhBklEVMO4rEQDZX2 QbZ6NAc/NL74LfMVQKznhbauHNHs4xAtlHZuyNfThN6+2HQIeg5YCgL9f4khZLUX3WzH x2H9HVE6TuxprbbsSWQ247ukiL50WurxJKVrZ5GDO7OajN9yiU73ItHEQcbeFwt1FJqg 6NIxshhdCUTFgTXcvyum/Bmb6dfegMSEsR4DgnPOSyntxKUEnis8VlSVj7Znzf8dSsmu 5g+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LvQD3UIE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b17si9483470ejp.314.2021.05.24.06.25.47; Mon, 24 May 2021 06:26:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LvQD3UIE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232685AbhEXN0T (ORCPT + 99 others); Mon, 24 May 2021 09:26:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:44892 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232426AbhEXN0S (ORCPT ); Mon, 24 May 2021 09:26:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621862690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4XLlEUkhiAcP2K4ZB+J18mgQ/icUCahgsIUqJqs8aT8=; b=LvQD3UIEQraMlUaipeFIXB0KErsoODNUWeSb2zKfpRipQBoK46GayHY3pMryDPezQOvFfq 1tp9Khp3tXYvZ9KfuUD1zCZKEpxWELNrU5GZwx4qWMQW//cTQeu8gx2nxh7K98WgK4xkEc 2HITjwvTSriwVpziKwqFRN9d4Wd/yN8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-525-jomfIlbHN1CH-3P2nYiTDA-1; Mon, 24 May 2021 09:24:46 -0400 X-MC-Unique: jomfIlbHN1CH-3P2nYiTDA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B747B100A241; Mon, 24 May 2021 13:24:44 +0000 (UTC) Received: from localhost (ovpn-113-244.ams2.redhat.com [10.36.113.244]) by smtp.corp.redhat.com (Postfix) with ESMTP id D599E50233; Mon, 24 May 2021 13:24:38 +0000 (UTC) Date: Mon, 24 May 2021 14:24:37 +0100 From: Stefan Hajnoczi To: Hannes Reinecke Cc: Dongli Zhang , virtualization@lists.linux-foundation.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, mst@redhat.com, jasowang@redhat.com, pbonzini@redhat.com, jejb@linux.ibm.com, martin.petersen@oracle.com, joe.jin@oracle.com, junxiao.bi@oracle.com, srinivas.eeda@oracle.com Subject: Re: [RFC] virtio_scsi: to poll and kick the virtqueue in timeout handler Message-ID: References: <20210523063843.1177-1-dongli.zhang@oracle.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="S/KzmU9AGl0WrRAq" Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --S/KzmU9AGl0WrRAq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 23, 2021 at 09:39:51AM +0200, Hannes Reinecke wrote: > On 5/23/21 8:38 AM, Dongli Zhang wrote: > > This RFC is to trigger the discussion about to poll and kick the > > virtqueue on purpose in virtio-scsi timeout handler. > >=20 > > The virtio-scsi relies on the virtio vring shared between VM and host. > > The VM side produces requests to vring and kicks the virtqueue, while t= he > > host side produces responses to vring and interrupts the VM side. > >=20 > > By default the virtio-scsi handler depends on the host timeout handler > > by BLK_EH_RESET_TIMER to give host a chance to perform EH. > >=20 > > However, this is not helpful for the case that the responses are availa= ble > > on vring but the notification from host to VM is lost. > >=20 > How can this happen? > If responses are lost the communication between VM and host is broken, and > we should rather reset the virtio rings themselves. I agree. In principle it's fine to poll the virtqueue at any time, but I don't understand the failure scenario here. It's not clear to me why the device-to-driver vq notification could be lost. Stefan --S/KzmU9AGl0WrRAq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmCrqRUACgkQnKSrs4Gr c8ja+gf9GSHdRkmM60mxLZ82ONQ0mRq3/yKUUtqLg3POUVan4p1AT+T6YazetRxA 1ux2OmVeDXzAfe9mawQXQLZ5ArlNGYGR+hfi30ECCfXGMkmdhJN42JO57bzYhyfM ezn5v4l8Dk6d6sdTwQbqaj0KJ8MGS3OqZ4Sd/zanTVlOEi3fuiY0NRYRRQG8xWkr TFB8ZqPqQvFfdtrjZQHufl9GaZr/pn3xP3bKNXwKWTGCO4zUsgNzddvjGjcAsDh8 a9dX8ujl+N2xQYcp/EpWbeg3H8S/kyMv2834ZHaBH9FEG2K/Z25HfXTzInOSZiRs vyysHy57N24AFAeVx11lAKTqkkvxcQ== =8nHX -----END PGP SIGNATURE----- --S/KzmU9AGl0WrRAq--