On 8/16/22 09:37, Dylan Yudaken wrote:
On Tue, 2022-08-16 at 08:42 +0100, Pavel Begunkov wrote:
Considering limited amount of slots some users struggle with
registration time notification tag assignment as it's hard to manage
notifications using sequence numbers. Add a simple feature that
copies
sqe->user_data of a send(+flush) request into the notification CQE it
flushes (and only when it's flushes).
I think for this to be useful I think it would also be needed to have
flags on the generated CQE.
If there are more CQEs coming for the same request it should have
IORING_CQE_F_MORE set. Otherwise user space would not be able to know
if it is able to reuse local data.
If you want to have:
expect_more = cqe->flags & IORING_CQE_F_MORE;
Then in the current form you can perfectly do that with
// MSG_WAITALL
expect_more = (cqe->res == io_len);
// !MSG_WAITALL,
expect_more = (cqe->res >= 0);
But might be more convenient to have IORING_CQE_F_MORE set,
one problem is a slight change of (implicit) semantics, i.e.
we don't execute linked requests when filling a IORING_CQE_F_MORE
CQE + CQE ordering implied from that.
It's maybe worth to not rely on the link failing concept for
deciding whether to flush or not.
Additionally it would need to provide a way of disambiguating the send
CQE with the flush CQE.
Do you mean like IORING_CQE_F_NOTIF from 1/2?
--
Pavel Begunkov