netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Schoenebeck <linux_oss@crudebyte.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: v9fs-developer@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	Dominique Martinet <asmadeus@codewreck.org>,
	Eric Van Hensbergen <ericvh@gmail.com>,
	Latchesar Ionkov <lucho@ionkov.net>,
	Nikolay Kichukov <nikolay@oldum.net>,
	Leon Romanovsky <leonro@nvidia.com>, Greg Kurz <groug@kaod.org>,
	Stefano Stabellini <stefano.stabellini@xilinx.com>
Subject: Re: [PATCH v6 11/11] net/9p: allocate appropriate reduced message buffers
Date: Mon, 17 Oct 2022 20:03:28 +0200	[thread overview]
Message-ID: <4858768.YlS1rbApJJ@silver> (raw)
In-Reply-To: <Y02Kz2xuntFrKXhV@nvidia.com>

On Monday, October 17, 2022 7:03:11 PM CEST Jason Gunthorpe wrote:
> On Fri, Jul 15, 2022 at 11:33:56PM +0200, Christian Schoenebeck wrote:
> > So far 'msize' was simply used for all 9p message types, which is far
> > too much and slowed down performance tremendously with large values
> > for user configurable 'msize' option.
> > 
> > Let's stop this waste by using the new p9_msg_buf_size() function for
> > allocating more appropriate, smaller buffers according to what is
> > actually sent over the wire.
> > 
> > Only exception: RDMA transport is currently excluded from this message
> > size optimization - for its response buffers that is - as RDMA transport
> > would not cope with it, due to its response buffers being pulled from a
> > shared pool. [1]
> > 
> > Link: https://lore.kernel.org/all/Ys3jjg52EIyITPua@codewreck.org/ [1]
> > Signed-off-by: Christian Schoenebeck <linux_oss@crudebyte.com>
> > ---
> > 
> >  net/9p/client.c | 42 +++++++++++++++++++++++++++++++++++-------
> >  1 file changed, 35 insertions(+), 7 deletions(-)
> 
> It took me a while to sort out, but for any others - this patch is
> incompatible with qemu 5.0. It starts working again after this qemu
> patch:
> 
> commit cf45183b718f02b1369e18c795dc51bc1821245d
> Author: Stefano Stabellini <stefano.stabellini@xilinx.com>
> Date:   Thu May 21 12:26:25 2020 -0700
> 
>     Revert "9p: init_in_iov_from_pdu can truncate the size"
> 
>     This reverts commit 16724a173049ac29c7b5ade741da93a0f46edff7.
>     It causes https://bugs.launchpad.net/bugs/1877688.
> 
>     Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
>     Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
>     Message-Id: <20200521192627.15259-1-sstabellini@kernel.org>
>     Signed-off-by: Greg Kurz <groug@kaod.org>
> 
> It causes something like this:
> 
> # modprobe ib_cm
> qemu-system-x86_64: VirtFS reply type 117 needs 17 bytes, buffer has 17,
> less than minimum

9p server in QEMU 5.0 was broken by mentioned, reverted QEMU patch, and it was 
already fixed in stable release 5.0.1.

It is not that recent kernel patch is breaking behaviour, but it triggers that 
(short-lived) QEMU bug more reliably, as 9p client is now using smaller 
messages more often. But even without this kernel patch, you would still get a 
QEMU hang with short I/O. So it is not a good idea to continue using that 
particular, old QEMU version, please update at least to QEMU 5.0.1.

Best regards,
Christian Schoenebeck



  reply	other threads:[~2022-10-17 18:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15 21:35 [PATCH v6 00/11] remove msize limit in virtio transport Christian Schoenebeck
2022-07-15 21:32 ` [PATCH v6 01/11] 9p/trans_virtio: separate allocation of scatter gather list Christian Schoenebeck
2022-07-15 21:32 ` [PATCH v6 02/11] 9p/trans_virtio: turn amount of sg lists into runtime info Christian Schoenebeck
2022-07-15 21:32 ` [PATCH v6 03/11] 9p/trans_virtio: introduce struct virtqueue_sg Christian Schoenebeck
2022-07-15 21:32 ` [PATCH v6 04/11] net/9p: add trans_maxsize to struct p9_client Christian Schoenebeck
2022-07-15 21:32 ` [PATCH v6 05/11] 9p/trans_virtio: support larger msize values Christian Schoenebeck
2022-07-15 21:32 ` [PATCH v6 06/11] 9p/trans_virtio: resize sg lists to whatever is possible Christian Schoenebeck
2022-07-15 21:32 ` [PATCH v6 07/11] net/9p: split message size argument into 't_size' and 'r_size' pair Christian Schoenebeck
2022-07-15 21:32 ` [PATCH v6 08/11] 9p: add P9_ERRMAX for 9p2000 and 9p2000.u Christian Schoenebeck
2022-07-15 21:32 ` [PATCH v6 09/11] net/9p: add p9_msg_buf_size() Christian Schoenebeck
2022-07-15 21:33 ` [PATCH v6 10/11] net/9p: add 'pooled_rbuffers' flag to struct p9_trans_module Christian Schoenebeck
2022-07-15 21:33 ` [PATCH v6 11/11] net/9p: allocate appropriate reduced message buffers Christian Schoenebeck
2022-10-17 17:03   ` Jason Gunthorpe
2022-10-17 18:03     ` Christian Schoenebeck [this message]
2022-07-15 22:30 ` [PATCH v6 00/11] remove msize limit in virtio transport Dominique Martinet
2022-07-15 23:28   ` Dominique Martinet
2022-07-16  9:54     ` Christian Schoenebeck
2022-07-16 11:54       ` Dominique Martinet
2022-07-16 12:10         ` Christian Schoenebeck
2022-07-16 12:44           ` Dominique Martinet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4858768.YlS1rbApJJ@silver \
    --to=linux_oss@crudebyte.com \
    --cc=asmadeus@codewreck.org \
    --cc=ericvh@gmail.com \
    --cc=groug@kaod.org \
    --cc=jgg@nvidia.com \
    --cc=leonro@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucho@ionkov.net \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@oldum.net \
    --cc=stefano.stabellini@xilinx.com \
    --cc=v9fs-developer@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).