netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Calculate VIRTQUEUE_NUM in "net/9p/trans_virtio.c" from stack size
@ 2024-10-25 16:18 Guan Xin
  2024-10-25 21:52 ` Dominique Martinet
  0 siblings, 1 reply; 6+ messages in thread
From: Guan Xin @ 2024-10-25 16:18 UTC (permalink / raw)
  To: v9fs; +Cc: Linux Kernel Network Developers, linux-fsdevel,
	Eric Van Hensbergen

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.

Author: GUAN Xin <guanx.bac@gmail.com>
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))

/* a single mutex to manage channel initialization and attachment */
static DEFINE_MUTEX(virtio_9p_lock);

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-10-27 13:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).