From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757893AbeAHPPL (ORCPT + 1 other); Mon, 8 Jan 2018 10:15:11 -0500 Received: from 2.mo5.mail-out.ovh.net ([178.33.109.111]:37346 "EHLO 2.mo5.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757846AbeAHPPJ (ORCPT ); Mon, 8 Jan 2018 10:15:09 -0500 X-Greylist: delayed 16742 seconds by postgrey-1.27 at vger.kernel.org; Mon, 08 Jan 2018 10:15:09 EST Date: Mon, 8 Jan 2018 10:18:09 +0100 From: Greg Kurz To: linux-kernel@vger.kernel.org Cc: v9fs-developer@lists.sourceforge.net, "Michael S. Tsirkin" , Jason Wang , Al Viro Subject: Re: [PATCH 0/2] 9p/trans_virtio: handle request cancellation Message-ID: <20180108101809.664d1822@bahia.lan> In-Reply-To: <151379198727.15509.2771563206512953068.stgit@bahia> References: <151379198727.15509.2771563206512953068.stgit@bahia> X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Ovh-Tracer-Id: 3987655995695733015 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtuddrkeefgddtudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi Michael, I wish you a happy new year, and I really need some feedback on this series because it holds down some patches on the QEMU side. Thanks, -- Greg On Wed, 20 Dec 2017 18:46:27 +0100 Greg Kurz wrote: > The 9p protocol mostly relies on a request/reply dialog between the > client and the server. A notable exception to this rule is request > cancellation (ie, flush in 9p wording): when the client requests an > in-flight request to be flushed, the server should only reply to the > flush request and not to the flushed in-flight request (otherwise it > considers the in-flight request to have completed just like it has > never been flushed). > > It is up to the client to inform the transport that the in-flight request > has been flushed and won't receive a reply. This is achieved with the > 'cancelled' operation of the struct p9_trans_module. > > This operation isn't currently implemented with the virtio transport. > As a consequence, flushed requests leave buffers in the used list > forever and the virtqueue ends up in being able to process only one > request at a time. > > This issue never popped up because the 9p server in QEMU had a bug > and would always reply to flushed requests. But this will be fixed > soon, so it is time to implement the 'cancelled' operation in the > 9p virtio transport. > > -- > Greg > > --- > > Greg Kurz (2): > virtio: allow to detach a buffer from the virtqueue > 9p/trans_virtio: implement cancelled callback > > > drivers/virtio/virtio_ring.c | 28 ++++++++++++++++++++++++++++ > include/linux/virtio.h | 1 + > net/9p/trans_virtio.c | 18 ++++++++++++++++++ > 3 files changed, 47 insertions(+) > >