From: Miklos Szeredi <miklos@szeredi.hu>
To: Bernd Schubert <bernd.schubert@fastmail.fm>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
Joanne Koong <joannelkoong@gmail.com>,
Josef Bacik <josef@toxicpanda.com>
Subject: Re: fuse-io-uring: We need to keep the tag/index
Date: Thu, 3 Oct 2024 14:02:20 +0200 [thread overview]
Message-ID: <CAJfpegtazfLLV9FoeUzSMbN3SoVoA6XfcHmOrMZnVMKxbRs0hQ@mail.gmail.com> (raw)
In-Reply-To: <813548b9-efd7-40d9-994f-20347071e7b6@fastmail.fm>
On Thu, 3 Oct 2024 at 12:10, Bernd Schubert <bernd.schubert@fastmail.fm> wrote:
> What I mean is that you wanted to get rid of the 'tag' - using any kind of
> search means we still need it. I.e. we cannot just take last list head
> or tail and use that.
> The array is only dynamic at initialization time. And why spending O(logN)
> to search instead of O(1)?
Because for sane queue depths they are essentially the same. This is
not where we can gain or lose any significant performance.
> And I know that it is an implementation detail, I just would like to avoid
> many rebasing rounds on these details.
I think the logical interface would be:
- pass a userspace buffer to FETCH (you told me, but I don't remember
why sqe->addr isn't suitable)
- set sqe->user_data to an implementation dependent value, this could
be just the userspace buffer, but it could be a request object
- kernel allocates an idle request and queues it.
- request comes in, kernel takes a request from the idle queue and fills it
- cqe->user_data is returned with the original sqe->user_data, which
should be sufficient for the server to identify the request
- process request, send COMMIT_AND_FETCH with the userspace buffer
and user data
- the kernel reads the header from the userspace buffer, finds
outh->unique, finds and completes the request
- then queues the request on the idle queue
...
What's wrong with that?
Thanks,
Miklos
next prev parent reply other threads:[~2024-10-03 12:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 21:54 fuse-io-uring: We need to keep the tag/index Bernd Schubert
2024-10-03 9:50 ` Miklos Szeredi
2024-10-03 10:10 ` Bernd Schubert
2024-10-03 12:02 ` Miklos Szeredi [this message]
2024-10-03 13:19 ` Bernd Schubert
2024-10-03 13:56 ` Bernd Schubert
2024-10-03 14:02 ` Miklos Szeredi
2024-10-03 14:04 ` Miklos Szeredi
2024-10-03 14:09 ` Bernd Schubert
2024-10-03 14:26 ` Miklos Szeredi
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=CAJfpegtazfLLV9FoeUzSMbN3SoVoA6XfcHmOrMZnVMKxbRs0hQ@mail.gmail.com \
--to=miklos@szeredi.hu \
--cc=bernd.schubert@fastmail.fm \
--cc=joannelkoong@gmail.com \
--cc=josef@toxicpanda.com \
--cc=linux-fsdevel@vger.kernel.org \
/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).