From: Artyom Pavlov <[email protected]>
To: [email protected]
Subject: Allow IORING_OP_ASYNC_CANCEL to cancel requests on other rings
Date: Wed, 5 Jul 2023 19:44:39 +0300 [thread overview]
Message-ID: <[email protected]> (raw)
Greetings!
Right now when I want to cancel request which runs on a different ring I
have to use IORING_OP_MSG_RING with a special len value. CQEs with res
equal to this special value get intercepted by my code and
IORING_OP_ASYNC_CANCEL SQE gets created in the receiver ring with
user_data taken from the received message. This approach kind of works,
but not efficient (it requires additional round trip through the ring)
and somewhat fragile (it relies on lack of collisions between the
special value and potential error codes).
I think it should be possible to add support for cancelling requests on
other rings to IORING_OP_ASYNC_CANCEL by introducing a new flag. If the
flag is enabled, then the fd field would be interpreted as fd of another
ring to which cancellation request should be sent. Using the fd field
would mean that the new flag would conflict with IORING_ASYNC_CANCEL_FD,
so it could be worth to use a different field for receiver ring fd.
Best regards,
Artyom Pavlov.
next reply other threads:[~2023-07-05 16:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 16:44 Artyom Pavlov [this message]
2023-07-05 18:32 ` Allow IORING_OP_ASYNC_CANCEL to cancel requests on other rings Jens Axboe
2023-07-12 18:25 ` Artyom Pavlov
2023-07-15 15:53 ` Jens Axboe
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] \
/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