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 13:06:08 +0000 [thread overview]
Message-ID: <53767b80-846d-47ee-a69b-f037a9a2d4da@gmail.com> (raw)
In-Reply-To: <988a3d72-a58b-45a4-8d98-8928de4f3ecf@kernel.dk>
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.
--
Pavel Begunkov
next prev parent reply other threads:[~2026-01-15 13:06 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 [this message]
2026-01-15 14:14 ` Jens Axboe
2026-01-15 17:19 ` Pavel Begunkov
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=53767b80-846d-47ee-a69b-f037a9a2d4da@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