From: Dominique Martinet <asmadeus@codewreck.org>
To: Christian Schoenebeck <linux_oss@crudebyte.com>,
Guan Xin <guanx.bac@gmail.com>
Cc: v9fs@lists.linux.dev,
Linux Kernel Network Developers <netdev@vger.kernel.org>,
linux-fsdevel@vger.kernel.org,
Eric Van Hensbergen <ericvh@kernel.org>
Subject: Re: Calculate VIRTQUEUE_NUM in "net/9p/trans_virtio.c" from stack size
Date: Sat, 26 Oct 2024 06:52:56 +0900 [thread overview]
Message-ID: <ZxwTOB5ENi66C_kq@codewreck.org> (raw)
In-Reply-To: <CANeMGR6CBxC8HtqbGamgpLGM+M1Ndng_WJ-RxFXXJnc9O3cVwQ@mail.gmail.com>
Christian,
this is more up your alley, letting you comment as well as you weren't
even sent a copy in Ccs
Guan,
overall, please check Documentation/process/submitting-patches.rst -
this is missing [PATCH] in the mail header, missing some recipients that
you'd have gotten from get_maintiner.pl, and the commit title is a mess.
Have a look at other recent patches on https://lore.kernel.org/v9fs/
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@gmail.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@gmail.com>
> cc: Eric Van Hensbergen <ericvh@kernel.org>
> cc: v9fs@lists.linux.dev
> cc: netdev@vger.kernel.org
> cc: linux-fsdevel@vger.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)
> /* a single mutex to manage channel initialization and attachment */
> static DEFINE_MUTEX(virtio_9p_lock);
>
--
Dominique Martinet | Asmadeus
next prev parent reply other threads:[~2024-10-25 21:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-25 16:18 Calculate VIRTQUEUE_NUM in "net/9p/trans_virtio.c" from stack size Guan Xin
2024-10-25 21:52 ` Dominique Martinet [this message]
2024-10-26 7:07 ` [PATCH] " Guan Xin
2024-10-26 9:36 ` Christian Schoenebeck
2024-10-26 10:14 ` Guan Xin
2024-10-27 13:11 ` Christian Schoenebeck
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=ZxwTOB5ENi66C_kq@codewreck.org \
--to=asmadeus@codewreck.org \
--cc=ericvh@kernel.org \
--cc=guanx.bac@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux_oss@crudebyte.com \
--cc=netdev@vger.kernel.org \
--cc=v9fs@lists.linux.dev \
/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).