From: Bernd Schubert <bschubert@ddn.com>
To: Miklos Szeredi <miklos@szeredi.hu>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>
Cc: Joanne Koong <joannelkoong@gmail.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH v2 5/7] fuse: {io-uring} Allow reduced number of ring queues
Date: Mon, 6 Oct 2025 10:35:02 +0000 [thread overview]
Message-ID: <22b4f200-2def-46c3-b848-5b2d5aa62338@ddn.com> (raw)
In-Reply-To: <20251003-reduced-nr-ring-queues_3-v2-5-742ff1a8fc58@ddn.com>
On 10/3/25 12:06, Bernd Schubert wrote:
> Queues selection (fuse_uring_get_queue) can handle reduced number
> queues - using io-uring is possible now even with a single
> queue and entry.
>
> Signed-off-by: Bernd Schubert <bschubert@ddn.com>
> ---
> fs/fuse/dev_uring.c | 35 +++--------------------------------
> 1 file changed, 3 insertions(+), 32 deletions(-)
>
> diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c
> index bb5d7a98536963ec2e4c10982d33633db2573f4d..f5946bb1bbea930522921d49c04e047c70d21ee2 100644
> --- a/fs/fuse/dev_uring.c
> +++ b/fs/fuse/dev_uring.c
> @@ -998,31 +998,6 @@ static int fuse_uring_commit_fetch(struct io_uring_cmd *cmd, int issue_flags,
> return 0;
> }
>
> -static bool is_ring_ready(struct fuse_ring *ring, int current_qid)
> -{
> - int qid;
> - struct fuse_ring_queue *queue;
> - bool ready = true;
> -
> - for (qid = 0; qid < ring->max_nr_queues && ready; qid++) {
> - if (current_qid == qid)
> - continue;
> -
> - queue = ring->queues[qid];
> - if (!queue) {
> - ready = false;
> - break;
> - }
> -
> - spin_lock(&queue->lock);
> - if (list_empty(&queue->ent_avail_queue))
> - ready = false;
> - spin_unlock(&queue->lock);
> - }
> -
> - return ready;
> -}
> -
> /*
> * fuse_uring_req_fetch command handling
> */
> @@ -1047,13 +1022,9 @@ static void fuse_uring_do_register(struct fuse_ring_ent *ent,
> cpumask_set_cpu(queue->qid, ring->numa_registered_q_mask[node]);
>
> if (!ring->ready) {
> - bool ready = is_ring_ready(ring, queue->qid);
> -
> - if (ready) {
> - WRITE_ONCE(fiq->ops, &fuse_io_uring_ops);
> - WRITE_ONCE(ring->ready, true);
> - wake_up_all(&fc->blocked_waitq);
> - }
> + WRITE_ONCE(fiq->ops, &fuse_io_uring_ops);
> + WRITE_ONCE(ring->ready, true);
> + wake_up_all(&fc->blocked_waitq);
> }
> }
>
>
We actually need to add a FUSE_INIT flag, fuse-server needs
to know when it can reduce the number of queues. If fuse-server
would do a lower number of queues unconditionally, the mount
point will hang after FUSE_INIT.
Thanks,
Bernd
next prev parent reply other threads:[~2025-10-06 10:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-03 10:06 [PATCH v2 0/7] fuse: {io-uring} Allow to reduce the number of queues and request distribution Bernd Schubert
2025-10-03 10:06 ` [PATCH v2 1/7] fuse: {io-uring} Add queue length counters Bernd Schubert
2025-10-03 10:06 ` [PATCH v2 2/7] fuse: {io-uring} Rename ring->nr_queues to max_nr_queues Bernd Schubert
2025-10-03 10:06 ` [PATCH v2 3/7] fuse: {io-uring} Use bitmaps to track registered queues Bernd Schubert
2025-10-06 9:51 ` Luis Henriques
2025-10-03 10:06 ` [PATCH v2 4/7] fuse: {io-uring} Distribute load among queues Bernd Schubert
2025-10-03 10:06 ` [PATCH v2 5/7] fuse: {io-uring} Allow reduced number of ring queues Bernd Schubert
2025-10-06 10:35 ` Bernd Schubert [this message]
2025-10-03 10:06 ` [PATCH v2 6/7] fuse: {io-uring} Queue background requests on a different core Bernd Schubert
2025-10-06 9:53 ` Luis Henriques
2025-10-06 10:31 ` Bernd Schubert
2025-10-03 10:06 ` [PATCH v2 7/7] fuse: Wake requests on the same cpu Bernd Schubert
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=22b4f200-2def-46c3-b848-5b2d5aa62338@ddn.com \
--to=bschubert@ddn.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=joannelkoong@gmail.com \
--cc=juri.lelli@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=miklos@szeredi.hu \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/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