From: Jens Axboe <axboe@kernel.dk>
To: Pavel Begunkov <asml.silence@gmail.com>,
io-uring <io-uring@vger.kernel.org>
Subject: Re: [PATCH for-next] io_uring/query: check for loops in in_query()
Date: Tue, 16 Sep 2025 12:33:12 -0600 [thread overview]
Message-ID: <da6a8cb0-d726-48ea-8f10-2e5852e5acd3@kernel.dk> (raw)
In-Reply-To: <437ebe86-3183-470a-b5d3-1d5ff8557e01@gmail.com>
On 9/16/25 9:05 AM, Pavel Begunkov wrote:
> I'd rather delay non fatal signals and even more so task work
> processing, it can't ever be reliable in general case otherwise
> and would always need to be executed in a loop. And the execution
> should be brief, likely shorter than non-interruptible sections
> of many syscalls. In this sense capping at 1000 can be a better
> choice.
Let's just cap it at 1000, at least that's a more reasonable number. I
don't think there's a perfect way to solve this problem, outside of
being able to detect loops, but at least 1000 can be documented as the
max limit. Not that anyone would ever get anywhere near that...
> You was pretty convincing insisting that extra waiting on teardown is
> not tolerable. In the same spirit there were discussions on how fast
> you can create rings. I wouldn't care if it's one or two extra
> syscalls, but I reasonably expect that it might grow to low double
> digit queries at some point, and 10-15 syscalls doesn't sound that
> comfortable while that can be easily avoided.
Those are completely different matters. The teardown slowness caused
100-150x slowdowns, doing 10-15 extra syscalls for setup is utter noise
and nobody would ever notice that, let alone complain about it. But I'm
willing to compromise on some sane lower limit, even if I think the
better API is just doing single queries at the time because that is the
sanest API when we don't need to care about squeezing out the last bit
of efficiency.
--
Jens Axboe
next prev parent reply other threads:[~2025-09-16 18:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 0:13 [PATCH for-next] io_uring/query: check for loops in in_query() Jens Axboe
2025-09-11 9:02 ` Pavel Begunkov
2025-09-11 11:40 ` Pavel Begunkov
2025-09-15 18:41 ` Jens Axboe
2025-09-16 15:05 ` Pavel Begunkov
2025-09-16 18:33 ` Jens Axboe [this message]
2025-09-16 18:35 ` Jens Axboe
2025-09-18 9:50 ` Pavel Begunkov
2025-09-18 10:27 ` 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 \
--in-reply-to=da6a8cb0-d726-48ea-8f10-2e5852e5acd3@kernel.dk \
--to=axboe@kernel.dk \
--cc=asml.silence@gmail.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