Commit e140759d authored by Florian Fischer's avatar Florian Fischer
Browse files

skip cqes for sucessfull forgotten Futures

We can not deal with cqes for forgotten Futures and not creating them
prevents the kernel and userspace overhead introduced by them.
parent f5c1c97d
......@@ -78,6 +78,13 @@ auto IoContext::prepareFutureChain(Future &future, unsigned chain_length) -> uns
// handle its completion.
io_uring_sqe_set_data(sqe, user_data);
if (future.isForgotten()) {
// Do not generate cqes for forgotten futures this reduces the kernel
// and user space overhead for cqes we do not need in the first place.
// This has no effect on kernel versions not supporing IOSQE_CQE_SKIP_SUCCESS.
sqe->flags |= IOSQE_CQE_SKIP_SUCCESS;
}
// If we use a single io_uring and a SubmitActor the submission and preparation
// of futures are decoupled.
// The Future may be used in a Fiber concurrently to the SubmitActor submitting it
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment