public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH] io_uring: add IORING_FEAT_FILES_SKIP feature flag
@ 2021-05-17 19:22 Drew DeVault
  2021-05-17 23:19 ` Pavel Begunkov
  0 siblings, 1 reply; 6+ messages in thread
From: Drew DeVault @ 2021-05-17 19:22 UTC (permalink / raw)
  To: io-uring; +Cc: Drew DeVault, noah, Jens Axboe, Pavel Begunkov

This signals that the kernel supports IORING_REGISTER_FILES_SKIP.

Signed-off-by: Drew DeVault <[email protected]>
---
 fs/io_uring.c                 | 3 ++-
 include/uapi/linux/io_uring.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index e481ac8a757a..6338c4892cd2 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -9659,7 +9659,8 @@ static int io_uring_create(unsigned entries, struct io_uring_params *p,
 			IORING_FEAT_SUBMIT_STABLE | IORING_FEAT_RW_CUR_POS |
 			IORING_FEAT_CUR_PERSONALITY | IORING_FEAT_FAST_POLL |
 			IORING_FEAT_POLL_32BITS | IORING_FEAT_SQPOLL_NONFIXED |
-			IORING_FEAT_EXT_ARG | IORING_FEAT_NATIVE_WORKERS;
+			IORING_FEAT_EXT_ARG | IORING_FEAT_NATIVE_WORKERS |
+			IORING_FEAT_FILES_SKIP;
 
 	if (copy_to_user(params, p, sizeof(*p))) {
 		ret = -EFAULT;
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index e1ae46683301..1b0887ab4d07 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -280,6 +280,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		(1U << 10)
 
 /*
  * io_uring_register(2) opcodes and arguments
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] io_uring: add IORING_FEAT_FILES_SKIP feature flag
  2021-05-17 19:22 [PATCH] io_uring: add IORING_FEAT_FILES_SKIP feature flag Drew DeVault
@ 2021-05-17 23:19 ` Pavel Begunkov
  2021-05-17 23:25   ` Drew DeVault
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Begunkov @ 2021-05-17 23:19 UTC (permalink / raw)
  To: Drew DeVault, io-uring; +Cc: noah, Jens Axboe

On 5/17/21 8:22 PM, Drew DeVault wrote:
> This signals that the kernel supports IORING_REGISTER_FILES_SKIP.

#define IORING_FEAT_FILES_SKIP IORING_FEAT_NATIVE_WORKERS

Maybe even solely in liburing. Any reason to have them separately?
We keep compatibility anyway

> Signed-off-by: Drew DeVault <[email protected]>
> ---
>  fs/io_uring.c                 | 3 ++-
>  include/uapi/linux/io_uring.h | 1 +
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index e481ac8a757a..6338c4892cd2 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -9659,7 +9659,8 @@ static int io_uring_create(unsigned entries, struct io_uring_params *p,
>  			IORING_FEAT_SUBMIT_STABLE | IORING_FEAT_RW_CUR_POS |
>  			IORING_FEAT_CUR_PERSONALITY | IORING_FEAT_FAST_POLL |
>  			IORING_FEAT_POLL_32BITS | IORING_FEAT_SQPOLL_NONFIXED |
> -			IORING_FEAT_EXT_ARG | IORING_FEAT_NATIVE_WORKERS;
> +			IORING_FEAT_EXT_ARG | IORING_FEAT_NATIVE_WORKERS |
> +			IORING_FEAT_FILES_SKIP;
>  
>  	if (copy_to_user(params, p, sizeof(*p))) {
>  		ret = -EFAULT;
> diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
> index e1ae46683301..1b0887ab4d07 100644
> --- a/include/uapi/linux/io_uring.h
> +++ b/include/uapi/linux/io_uring.h
> @@ -280,6 +280,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		(1U << 10)
>  
>  /*
>   * io_uring_register(2) opcodes and arguments
> 

-- 
Pavel Begunkov

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] io_uring: add IORING_FEAT_FILES_SKIP feature flag
  2021-05-17 23:19 ` Pavel Begunkov
@ 2021-05-17 23:25   ` Drew DeVault
  2021-05-17 23:32     ` Pavel Begunkov
  0 siblings, 1 reply; 6+ messages in thread
From: Drew DeVault @ 2021-05-17 23:25 UTC (permalink / raw)
  To: Pavel Begunkov, io-uring; +Cc: noah, Jens Axboe

On Mon May 17, 2021 at 7:19 PM EDT, Pavel Begunkov wrote:
> On 5/17/21 8:22 PM, Drew DeVault wrote:
> > This signals that the kernel supports IORING_REGISTER_FILES_SKIP.
>
> #define IORING_FEAT_FILES_SKIP IORING_FEAT_NATIVE_WORKERS
>
> Maybe even solely in liburing. Any reason to have them separately?
> We keep compatibility anyway

What is the relationship between IORING_FEAT_NATIVE_WORKERS and
IORING_REGISTER_FILES_SKIP? Actually, what is NATIVE_WORKERS? The
documentation is sparse on this detail.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] io_uring: add IORING_FEAT_FILES_SKIP feature flag
  2021-05-17 23:25   ` Drew DeVault
@ 2021-05-17 23:32     ` Pavel Begunkov
  2021-05-17 23:33       ` Drew DeVault
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Begunkov @ 2021-05-17 23:32 UTC (permalink / raw)
  To: Drew DeVault, io-uring; +Cc: noah, Jens Axboe

On 5/18/21 12:25 AM, Drew DeVault wrote:
> On Mon May 17, 2021 at 7:19 PM EDT, Pavel Begunkov wrote:
>> On 5/17/21 8:22 PM, Drew DeVault wrote:
>>> This signals that the kernel supports IORING_REGISTER_FILES_SKIP.
>>
>> #define IORING_FEAT_FILES_SKIP IORING_FEAT_NATIVE_WORKERS
>>
>> Maybe even solely in liburing. Any reason to have them separately?
>> We keep compatibility anyway
> 
> What is the relationship between IORING_FEAT_NATIVE_WORKERS and
> IORING_REGISTER_FILES_SKIP? Actually, what is NATIVE_WORKERS? The
> documentation is sparse on this detail.

They are not related by both came in 5.12, so if you have one
you have another

-- 
Pavel Begunkov

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] io_uring: add IORING_FEAT_FILES_SKIP feature flag
  2021-05-17 23:32     ` Pavel Begunkov
@ 2021-05-17 23:33       ` Drew DeVault
  2021-05-18  9:54         ` Pavel Begunkov
  0 siblings, 1 reply; 6+ messages in thread
From: Drew DeVault @ 2021-05-17 23:33 UTC (permalink / raw)
  To: Pavel Begunkov, io-uring; +Cc: noah, Jens Axboe

On Mon May 17, 2021 at 7:32 PM EDT, Pavel Begunkov wrote:
> > What is the relationship between IORING_FEAT_NATIVE_WORKERS and
> > IORING_REGISTER_FILES_SKIP? Actually, what is NATIVE_WORKERS? The
> > documentation is sparse on this detail.
>
> They are not related by both came in 5.12, so if you have one
> you have another

Gotcha. I'm open to a simple alias in liburing, in that case. I'll send
a new patch tomorrow morning.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] io_uring: add IORING_FEAT_FILES_SKIP feature flag
  2021-05-17 23:33       ` Drew DeVault
@ 2021-05-18  9:54         ` Pavel Begunkov
  0 siblings, 0 replies; 6+ messages in thread
From: Pavel Begunkov @ 2021-05-18  9:54 UTC (permalink / raw)
  To: Drew DeVault, io-uring; +Cc: noah, Jens Axboe

On 5/18/21 12:33 AM, Drew DeVault wrote:
> On Mon May 17, 2021 at 7:32 PM EDT, Pavel Begunkov wrote:
>>> What is the relationship between IORING_FEAT_NATIVE_WORKERS and
>>> IORING_REGISTER_FILES_SKIP? Actually, what is NATIVE_WORKERS? The
>>> documentation is sparse on this detail.
>>
>> They are not related by both came in 5.12, so if you have one
>> you have another
> 
> Gotcha. I'm open to a simple alias in liburing, in that case. I'll send
> a new patch tomorrow morning.

At least there won't be one release delay between feature and the flag
this way as it can't lend earlier than 5.13

-- 
Pavel Begunkov

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-18  9:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-17 19:22 [PATCH] io_uring: add IORING_FEAT_FILES_SKIP feature flag Drew DeVault
2021-05-17 23:19 ` Pavel Begunkov
2021-05-17 23:25   ` Drew DeVault
2021-05-17 23:32     ` Pavel Begunkov
2021-05-17 23:33       ` Drew DeVault
2021-05-18  9:54         ` Pavel Begunkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox