From: Pavel Begunkov <[email protected]>
To: Christian Dietrich <[email protected]>,
io-uring <[email protected]>
Cc: Horst Schirmeier <[email protected]>,
"Franz-B. Tuneke" <[email protected]>
Subject: Re: [RFC] Programming model for io_uring + eBPF
Date: Fri, 7 May 2021 16:13:35 +0100 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 5/5/21 5:13 PM, Christian Dietrich wrote:
> Christian Dietrich <[email protected]> [05. May 2021]:
>
>> So perhaps, we would do something like
>>
>> // alloc 3 groups
>> io_uring_register(fd, REGISTER_SYNCHRONIZATION_GROUPS, 3);
>>
>> // submit a synchronized SQE
>> sqe->flags |= IOSQE_SYNCHRONIZE;
>> sqe->synchronize_group = 1; // could probably be restricted to uint8_t.
>>
>> When looking at this, this could generally be a nice feature to have
>> with SQEs, or? Hereby, the user could insert all of his SQEs and they
>> would run sequentially. In contrast to SQE linking, the order of SQEs
>> would not be determined, which might be beneficial at some point.
>
> I was thinking further about this statement: "Performing (optional)
> serialization of eBPF-SQEs is similar to SQE linking".
>
> If we would want to implement the above interface of synchronization
> groups, it could be done without taking locks but by fixing the
> execution order at submit time. Thereby, synchronization groups would
> become a form of "implicit SQE linking".
>
> The following SQE would become: Append this SQE to the SQE-link chain
> with the name '1'. If the link chain has completed, start a new one.
> Thereby, the user could add an SQE to an existing link chain, even other
> SQEs are already submitted.
>
>> sqe->flags |= IOSQE_SYNCHRONIZE;
>> sqe->synchronize_group = 1; // could probably be restricted to uint8_t.
>
> Implementation wise, we would hold a pointer to the last element of the
> implicitly generated link chain.
Such things go really horribly with performant APIs as io_uring, even
if not used. Just see IOSQE_IO_DRAIN, it maybe almost never used but
still in the hot path.
--
Pavel Begunkov
next prev parent reply other threads:[~2021-05-07 15:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <[email protected]>
[not found] ` <[email protected]>
[not found] ` <[email protected]>
2021-04-16 15:49 ` [RFC] Programming model for io_uring + eBPF Pavel Begunkov
2021-04-20 16:35 ` Christian Dietrich
2021-04-23 15:34 ` Pavel Begunkov
2021-04-29 13:27 ` Christian Dietrich
2021-05-01 9:49 ` Pavel Begunkov
2021-05-05 12:57 ` Christian Dietrich
2021-05-05 16:13 ` Christian Dietrich
2021-05-07 15:13 ` Pavel Begunkov [this message]
2021-05-12 11:20 ` Christian Dietrich
2021-05-18 14:39 ` Pavel Begunkov
2021-05-19 16:55 ` Christian Dietrich
2021-05-20 11:14 ` Pavel Begunkov
2021-05-20 15:01 ` Christian Dietrich
2021-05-21 10:27 ` Pavel Begunkov
2021-05-27 11:12 ` Christian Dietrich
2021-06-02 10:47 ` Pavel Begunkov
2021-05-07 15:10 ` Pavel Begunkov
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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