From: Levo D <levoplusplusio@bolinlang.com>
To: <io-uring@vger.kernel.org>
Subject: Does io_uring_enter have anti-deadlock magic?
Date: Thu, 30 Oct 2025 00:32:36 +0000 [thread overview]
Message-ID: <20251030003236.88F8D17C155@bolinlang.com> (raw)
I'm using io-uring through system calls (I am *not* using liburing)
I tried to deadlock my code intentionally, but it's not allowing me, which makes me think I'm blocking incorrectly. I submitted a few commands (open, stat, reads on files, a read on a pipe), and on purpose I didn't write to the pipe.
I called 'io_uring_enter(fd, 0, 1, IORING_ENTER_SQ_WAIT, 0);' in a loop, and my logging says my submission head and tail are at 13, and my consume head and tail are at 12. Then I call enter, why is it returning without processing anything? I understand there's nothing to do because I didn't write to the pipe, but shouldn't this block?
I called io_uring_setup with 'IORING_SETUP_SQPOLL | IORING_SETUP_SINGLE_ISSUER | IORING_SETUP_NO_SQARRAY'
I'm not sure what else people may want to know, but how do I block until there's work to be consumed? Removing the IORING_SETUP_SINGLE_ISSUER doesn't help.
next reply other threads:[~2025-10-30 0:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-30 0:32 Levo D [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-10-30 1:30 Does io_uring_enter have anti-deadlock magic? Levo D
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=20251030003236.88F8D17C155@bolinlang.com \
--to=levoplusplusio@bolinlang.com \
--cc=io-uring@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