public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Gabriel Krisman Bertazi <krisman@suse.de>
Cc: io-uring@vger.kernel.org, axboe@kernel.dk
Subject: Re: [PATCH liburing 1/1] man: add io_uring_register_region.3
Date: Wed, 14 Jan 2026 14:30:03 +0000	[thread overview]
Message-ID: <726eb675-c3c9-4a81-abd6-e5bd44e383fe@gmail.com> (raw)
In-Reply-To: <87ldi12o91.fsf@mailhost.krisman.be>

On 1/13/26 21:31, Gabriel Krisman Bertazi wrote:
> Pavel Begunkov <asml.silence@gmail.com> writes:
> 
>> Describe the region API. As it was created for a bunch of ideas in mind,
>> it doesn't go into details about wait argument passing, which I assume
>> will be a separate page the region description can refer to.
>>
> 
> Hey, Pavel.

Hey Gabriel,

thanks for taking a look

...
>> +.BR io_uring_register_region (3)
>> +function registers a memory region to io_uring. The memory region can after be
>> +used, for example, to pass waiting parameters to the
>> +.BR io_uring_enter (2)
>> +system call in an efficient manner. The
>> +.IR ring
> 
> .I ring

I copied most of the macro choices from another liburing man
page, I can't say if diverging them worth it and/or what is
more commonly used. But in either case, I don't have any
opinion on that.

...
>> +.I region_uptr
>> +field must contain a pointer to an appropriately filled
>> +.B struct io_uring_region_desc.
> 
> .IR struct io_uring_region_desc .
> 
>> +.PP
>> +The
>> +.I flags
>> +field must contain a bitmask of the following values:
>> +.TP
>> +.B IORING_MEM_REGION_REG_WAIT_ARG
>> +allows to use the region topass waiting parameters to the
> 
> "to pass"

Oops, slipped through, thanks!

>> +.BR io_uring_enter (2)
>> +system call. If set, the registration is only allowed while the ring
>> +is in a disabled mode.
> 
> While the ring is disabled.

I was thinking that "disabled state" is clearer, but I guess doesn't
really matter, especially since R_DISABLED is mentioned.


>> +.I user_addr
>> +field must contain a pointer to the memory the user wants to register. It's
>> +only valid if
>> +.B IORING_MEM_REGION_TYPE_USER
>> +is set, and should be zero otherwise.
> 
> must be set to zero otherwise.

Agreed, "must" is more appropriate here.

...
>> +The
>> +.I flags
>> +field must contain a bitmask of the following values:
>> +.TP
>> +.B IORING_MEM_REGION_TYPE_USER
>> +tells the kernel to use memory specified by the
>> +.I user_addr
>> +field. If not set, the kernel will allocate memory for the region, which can
>> +then be mapped into the user space.
>> +
>> +.PP
>> +On a successful registration of a region with kernel provided memory, the
> 
> "On success, the"

The "kernel provided memory" part is important here, which is why the
sentence is expanded.

-- 
Pavel Begunkov


      parent reply	other threads:[~2026-01-14 14:30 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
2026-01-14 14:30   ` Pavel Begunkov [this message]

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=726eb675-c3c9-4a81-abd6-e5bd44e383fe@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