public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Drew DeVault <[email protected]>, [email protected]
Cc: noah <[email protected]>, Pavel Begunkov <[email protected]>
Subject: Re: [PATCH] Add IORING_FEAT_FILES_SKIP feature flag
Date: Thu, 20 May 2021 07:32:44 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 5/18/21 10:12 AM, Drew DeVault wrote:
> This is aliased to IORING_FEAT_NATIVE_WORKERS, which was shipped in the
> same kernel release. A separate flag is useful because the features are
> unrelated, so user code testing for IORING_FEAT_NATIVE_WORKERS before
> using FILES_SKIP is not very obvious in intent.
> 
> Signed-off-by: Drew DeVault <[email protected]>
> ---
>  man/io_uring_register.2         | 10 ++++++++--
>  src/include/liburing/io_uring.h |  1 +
>  2 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/man/io_uring_register.2 b/man/io_uring_register.2
> index 5326a87..c71ce40 100644
> --- a/man/io_uring_register.2
> +++ b/man/io_uring_register.2
> @@ -156,8 +156,14 @@ since 5.5.
>  File descriptors can be skipped if they are set to
>  .B IORING_REGISTER_FILES_SKIP.
>  Skipping an fd will not touch the file associated with the previous
> -fd at that index. Available since 5.12.
> -
> +fd at that index. Available since 5.12. Availability of this feature is
> +indicated by the presence of the
> +.B IORING_FEAT_FILES_SKIP
> +bit in the
> +.I features
> +field of the
> +.I io_uring_params
> +structure.
>  
>  .TP
>  .B IORING_UNREGISTER_FILES
> diff --git a/src/include/liburing/io_uring.h b/src/include/liburing/io_uring.h
> index 5a3cb90..091dcf7 100644
> --- a/src/include/liburing/io_uring.h
> +++ b/src/include/liburing/io_uring.h
> @@ -285,6 +285,7 @@ struct io_uring_params {
>  #define IORING_FEAT_SQPOLL_NONFIXED	(1U << 7)
>  #define IORING_FEAT_EXT_ARG		(1U << 8)
>  #define IORING_FEAT_NATIVE_WORKERS	(1U << 9)
> +#define IORING_FEAT_FILES_SKIP		IORING_FEAT_NATIVE_WORKERS

I don't think this is a great idea. It can be used as a "probably we have
this feature" in userspace, but I don't like aliasing on the kernel side.


-- 
Jens Axboe


  reply	other threads:[~2021-05-20 13:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 16:12 [PATCH] Add IORING_FEAT_FILES_SKIP feature flag Drew DeVault
2021-05-20 13:32 ` Jens Axboe [this message]
2021-05-20 21:55   ` Drew DeVault
2021-05-20 22:54     ` Pavel Begunkov
2021-05-20 23:09       ` Drew DeVault

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] \
    [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