public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Xiaoguang Wang <[email protected]>,
	[email protected]
Cc: [email protected]
Subject: Re: [RFC] io_uring: let IORING_OP_FILES_UPDATE support to choose fixed file slot
Date: Sat, 28 May 2022 06:27:55 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 5/26/22 6:38 AM, Xiaoguang Wang wrote:
> One big issue with file registration feature is that it needs user
> space apps to maintain free slot info about io_uring's fixed file
> table, which really is a burden for development. Now since io_uring
> starts to choose free file slot for user space apps by using
> IORING_FILE_INDEX_ALLOC flag in accept or open operations, but they
> need app to uses direct accept or direct open, which as far as I know,
> some apps are not prepared to use direct accept or open yet.
> 
> To support apps, who still need real fds, use registration feature
> easier, let IORING_OP_FILES_UPDATE support to choose fixed file slot,
> which will return free file slot in cqe->res.

This looks good. In retrospect, the direct open/accept/etc really
should've just returned the direct descriptor in cqe->res, so we would
not have this odd "0 for success when you pick a slot, <slot> in
cqe->res if io_uring picks it". But this is consistent with the alloc
case.

Do you have a liburing test case too? I think we should just get this
done for 5.19 rather than spread it over multiple releases, since 5.19
introduced the alloc as well.

-- 
Jens Axboe



      parent reply	other threads:[~2022-05-28 12:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-26 12:38 [RFC] io_uring: let IORING_OP_FILES_UPDATE support to choose fixed file slot Xiaoguang Wang
2022-05-27  5:54 ` Hao Xu
2022-05-28  9:45   ` Xiaoguang Wang
2022-05-28 12:27 ` Jens Axboe [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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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