[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANeMGR4TFdLnrH-=S7ZNacaOendJvm_ocbvN-Md8A6rAQdmkhg@mail.gmail.com>
Date: Sat, 26 Oct 2024 15:07:08 +0800
From: Guan Xin <guanx.bac@...il.com>
To: Dominique Martinet <asmadeus@...ewreck.org>
Cc: Christian Schoenebeck <linux_oss@...debyte.com>, v9fs@...ts.linux.dev,
Linux Kernel Network Developers <netdev@...r.kernel.org>, linux-fsdevel@...r.kernel.org,
Eric Van Hensbergen <ericvh@...nel.org>
Subject: Re: [PATCH] Calculate VIRTQUEUE_NUM in "net/9p/trans_virtio.c" from
stack size
Dominique,
On Sat, Oct 26, 2024 at 5:53 AM Dominique Martinet
<asmadeus@...ewreck.org> wrote:
>
>> Have a look at other recent patches on https://lore.kernel.org/v9fs/
Sorry I'm new to Linux and didn't find out the exact workflow from the
numerous instruction files.
Thank you for pointing me to the examples!
This is greatly helpful.
Guan
P.S. Patch attached:
> Guan Xin wrote on Sat, Oct 26, 2024 at 12:18:42AM +0800:
> > For HPC applications the hard-coded VIRTQUEUE_NUM of 128 seems to
> > limit the throughput of guest systems accessing cluster filesystems
> > mounted on the host.
> >
> > Just increase VIRTQUEUE_NUM for kernels with a
> > larger stack.
>
> You're replacing an hardcoded value with another, this could be made
> dynamic e.g. as a module_param so someone could tune this based on their
> actual needs (and test more easily); I'd more readily accept such a
> patch.
>
> > Author: GUAN Xin <guanx.bac@...il.com>
>
> Author: tag doesn't exist and would be useless here as it's the mail you
> sent the patch from.
>
> > Signed-off-by: GUAN Xin <guanx.bac@...il.com>
> > cc: Eric Van Hensbergen <ericvh@...nel.org>
> > cc: v9fs@...ts.linux.dev
> > cc: netdev@...r.kernel.org
> > cc: linux-fsdevel@...r.kernel.org
> >
> > --- net/9p/trans_virtio.c.orig 2024-10-25 10:25:09.390922517 +0800
> > +++ net/9p/trans_virtio.c 2024-10-25 16:48:40.451680192 +0800
> > @@ -31,11 +31,12 @@
> > #include <net/9p/transport.h>
> > #include <linux/scatterlist.h>
> > #include <linux/swap.h>
> > +#include <linux/thread_info.h>
> > #include <linux/virtio.h>
> > #include <linux/virtio_9p.h>
> > #include "trans_common.h"
> >
> > -#define VIRTQUEUE_NUM 128
> > +#define VIRTQUEUE_NUM (1 << (THREAD_SIZE_ORDER + PAGE_SHIFT - 6))
>
> (FWIW that turned out to be 256 on my system)
Powered by blists - more mailing lists