From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, Gabriel Krisman Bertazi <krisman@suse.de>
Cc: io-uring@vger.kernel.org
Subject: Re: [PATCH liburing 1/1] man: add io_uring_register_region.3
Date: Thu, 15 Jan 2026 17:19:15 +0000 [thread overview]
Message-ID: <4158ac4d-b55f-4eab-8e42-a89555d3b2e5@gmail.com> (raw)
In-Reply-To: <1c9a7c71-fc6d-4630-bfd5-f0e567d96e85@kernel.dk>
On 1/15/26 14:14, Jens Axboe wrote:
> On 1/15/26 6:06 AM, Pavel Begunkov wrote:
>> On 1/14/26 23:53, Jens Axboe wrote:
>> ...
>>>>>> And the compiler is smart enough to optimise it out since
>>>>>> it's all on stack.
>>>>>
>>>>> Not sure I follow these emails. For the normal case,
>>>>> io_validate_ext_arg() copies in the args via a normal user copy, which
>>>>> depending on options and the arch (or even sub-arch, amd more expensive)
>>>>> is more or less expensive.
>>>>
>>>> In the end, after prep that is still just a move instruction, e.g.
>>>> for x86. And it loads into a register and stores it into ext_arg,
>>>> just like with registration. User copy needs to prepare page fault
>>>> handling / etc., which could be costly (e.g. I see stac + lfence
>>>> in asm), but that's not exactly about avoiding copies.
>>>
>>> Those are implementation details. The user copy is stac/clac, and then
>>> the loads. This is what makes it more expensive. I don't want to be
>>> writing about stac/clac in the man page, that's irrelevant to the user.
>>
>> Confused why would you be thinking about putting that into the
>> man page. I'm saying that it claims copy avoidance, but there is
>> no difference in the number of copies. It's also uncomfortable
>> that it's in a commit with my name attached, while the change
>> wouldn't fall under the "language edits" note.
>
> Sheesh let's turn down the sensitivity. If you want it changed, send a
Not sure what kind of sensitivity you mean, but no worries, there
wasn't any. I still believe, however, that technicalities like in
this case matter.
> patch. I'm trying to phrase it in such a way that it makes sense to
> people without getting into too much detail. It avoids copying from
> USERSPACE, which is the expensive part.
>
> I think we've spent enough time on this detail at this point, no?
--
Pavel Begunkov
next prev parent reply other threads:[~2026-01-15 17:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-13 20:05 [PATCH liburing 1/1] man: add io_uring_register_region.3 Pavel Begunkov
2026-01-13 20:35 ` Jens Axboe
2026-01-13 21:31 ` Gabriel Krisman Bertazi
2026-01-13 22:37 ` Jens Axboe
2026-01-14 14:42 ` Pavel Begunkov
2026-01-14 14:54 ` Pavel Begunkov
2026-01-14 16:04 ` Pavel Begunkov
2026-01-14 17:23 ` Jens Axboe
2026-01-14 18:50 ` Pavel Begunkov
2026-01-14 23:53 ` Jens Axboe
2026-01-15 13:06 ` Pavel Begunkov
2026-01-15 14:14 ` Jens Axboe
2026-01-15 17:19 ` Pavel Begunkov [this message]
2026-01-14 14:30 ` 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=4158ac4d-b55f-4eab-8e42-a89555d3b2e5@gmail.com \
--to=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=krisman@suse.de \
/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