FAILED: patch "[PATCH] io_uring: only flush workqueues on fileset removal" failed to apply to 5.3-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 5.3-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 8a99734081775c012a4a6c442fdef0379fe52bdf Mon Sep 17 00:00:00 2001
From: Jens Axboe <[email protected]>
Date: Wed, 9 Oct 2019 14:40:13 -0600
Subject: [PATCH] io_uring: only flush workqueues on fileset removal
We should not remove the workqueue, we just need to ensure that the workqueues are synced. The workqueues are torn down on ctx removal.
fs/io_uring.c +5 -1
@@ -2866,8 +2866,12 @@ static void io_finish_async(struct io_ring_ctx *ctx)static void io_destruct_skb (struct sk_buff *skb) {struct io_ring_ctx *ctx = skb->sk->sk_user_data; +int i; + +for (i =0 ; i <ARRAY_SIZE (ctx->sqo_wq); i++) +if (ctx->sqo_wq[i]) +flush_workqueue (ctx->sqo_wq[i]); -io_finish_async (ctx);unix_destruct_scm (skb); }
Greg KH
maintainerQuoted 34 lines · On Wed, Oct 16, 2019 at 09:04:43AM -0700, [email protected] wrote:
The patch below does not apply to the 5.3-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
8a99734081775c012a4a6c442fdef0379fe52bdfMon Sep 17 00:00:00 2001From: Jens Axboe <[email protected]>
Date: Wed, 9 Oct 2019 14:40:13 -0600
Subject: [PATCH]io_uring: only flush workqueues on fileset removalWe should not remove the workqueue, we just need to ensure that the workqueues are synced. The workqueues are torn down on ctx removal.
Fixes 6b06314c47e1 ("io_uring: add file set registration")Reported-by Stefan Hajnoczi <[email protected]>Signed-off-by Jens Axboe <[email protected]>fs/io_uring.c +0
-0@@ -2866,8 +2866,12 @@ static void io_finish_async(struct io_ring_ctx *ctx)static void io_destruct_skb (struct sk_buff *skb) {struct io_ring_ctx *ctx = skb->sk->sk_user_data;
fs/io_uring.c static void io_finish_async(struct io_ring_ctx *ctx) · line 2877
Quoted 10 lines
fs/io_uring.c +5
-1+int i; + +for (i =0 ; i <ARRAY_SIZE (ctx->sqo_wq); i++) +if (ctx->sqo_wq[i]) +flush_workqueue (ctx->sqo_wq[i]); -io_finish_async (ctx);unix_destruct_scm (skb); }
This fails to build as sqo_wq is a pointer in 5.3, not an arrary. Backporting that array change feels "big" for 5.3, is that needed here, or can this be fixed differently?
thanks,
greg k-h
Quoted 40 lines · Greg KH
Quoted 39 lines · On Wed, Oct 16, 2019 at 09:04:43AM -0700, [email protected] wrote:
The patch below does not apply to the 5.3-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
8a99734081775c012a4a6c442fdef0379fe52bdfMon Sep 17 00:00:00 2001From: Jens Axboe <[email protected]>
Date: Wed, 9 Oct 2019 14:40:13 -0600
Subject: [PATCH]io_uring: only flush workqueues on fileset removalWe should not remove the workqueue, we just need to ensure that the workqueues are synced. The workqueues are torn down on ctx removal.
Fixes 6b06314c47e1 ("io_uring: add file set registration")Reported-by Stefan Hajnoczi <[email protected]>Signed-off-by Jens Axboe <[email protected]>fs/io_uring.c +5
-0@@ -2866,8 +2866,12 @@ static void io_finish_async(struct io_ring_ctx *ctx)static void io_destruct_skb (struct sk_buff *skb) {struct io_ring_ctx *ctx = skb->sk->sk_user_data; +int i; + +for (i =0 ; i <ARRAY_SIZE (ctx->sqo_wq); i++) +if (ctx->sqo_wq[i]) +flush_workqueue (ctx->sqo_wq[i]);
Quoted 9 lines
fs/io_uring.c static void io_finish_async(struct io_ring_ctx *ctx) · line 2877
Quoted 5 lines
fs/io_uring.c +0
-1-io_finish_async (ctx);unix_destruct_scm (skb); }This fails to build as
sqo_wqis a pointer in 5.3, not an arrary. Backporting that array change feels "big" for 5.3, is that needed here, or can this be fixed differently?
Yeah, we don't need to do that. It's just a pointer in 5.3, not an array of pointers, so the below should be all we need for 5.3 (and 5.2/5.1).
fs/io_uring.c +2 -1
@@ -2564,7 +2564,8 @@ static void io_destruct_skb(struct sk_buff *skb) {struct io_ring_ctx *ctx = skb->sk->sk_user_data; -io_finish_async (ctx); +if (ctx->sqo_wq) +flush_workqueue (ctx->sqo_wq);unix_destruct_scm (skb); }
Signature · 1 line
Jens Axboe
Greg KH
maintainerQuoted 51 lines · Jens Axboe
Quoted 40 lines · Greg KH
Quoted 39 lines · On Wed, Oct 16, 2019 at 09:04:43AM -0700, [email protected] wrote:
The patch below does not apply to the 5.3-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
8a99734081775c012a4a6c442fdef0379fe52bdfMon Sep 17 00:00:00 2001From: Jens Axboe <[email protected]>
Date: Wed, 9 Oct 2019 14:40:13 -0600
Subject: [PATCH]io_uring: only flush workqueues on fileset removalWe should not remove the workqueue, we just need to ensure that the workqueues are synced. The workqueues are torn down on ctx removal.
Fixes 6b06314c47e1 ("io_uring: add file set registration")Reported-by Stefan Hajnoczi <[email protected]>Signed-off-by Jens Axboe <[email protected]>fs/io_uring.c +5
-0@@ -2866,8 +2866,12 @@ static void io_finish_async(struct io_ring_ctx *ctx)static void io_destruct_skb (struct sk_buff *skb) {struct io_ring_ctx *ctx = skb->sk->sk_user_data; +int i; + +for (i =0 ; i <ARRAY_SIZE (ctx->sqo_wq); i++) +if (ctx->sqo_wq[i]) +flush_workqueue (ctx->sqo_wq[i]);Quoted 9 lines
fs/io_uring.c static void io_destruct_skb(struct sk_buff *skb) · line 2571
Quoted 5 lines
fs/io_uring.c +0
-1-io_finish_async (ctx);unix_destruct_scm (skb); }This fails to build as
sqo_wqis a pointer in 5.3, not an arrary. Backporting that array change feels "big" for 5.3, is that needed here, or can this be fixed differently?
Quoted 3 lines
Yeah, we don't need to do that. It's just a pointer in 5.3, not an array of pointers, so the below should be all we need for 5.3 (and 5.2/5.1).
5.2/5.1 are long end-of-life, but this change looks sane. I'll go queue it up for 5.3.y, thanks for the patch!
greg k-h
Quoted 52 lines · Greg KH
Quoted 51 lines · Jens Axboe
Quoted 49 lines · Greg KH
Quoted 34 lines · On Wed, Oct 16, 2019 at 09:04:43AM -0700, [email protected] wrote:
The patch below does not apply to the 5.3-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
8a99734081775c012a4a6c442fdef0379fe52bdfMon Sep 17 00:00:00 2001From: Jens Axboe <[email protected]>
Date: Wed, 9 Oct 2019 14:40:13 -0600
Subject: [PATCH]io_uring: only flush workqueues on fileset removalWe should not remove the workqueue, we just need to ensure that the workqueues are synced. The workqueues are torn down on ctx removal.
Fixes 6b06314c47e1 ("io_uring: add file set registration")Reported-by Stefan Hajnoczi <[email protected]>Signed-off-by Jens Axboe <[email protected]>fs/io_uring.c +0
-0@@ -2866,8 +2866,12 @@ static void io_finish_async(struct io_ring_ctx *ctx)static void io_destruct_skb (struct sk_buff *skb) {struct io_ring_ctx *ctx = skb->sk->sk_user_data;fs/io_uring.c static void io_finish_async(struct io_ring_ctx *ctx) · line 2877
Quoted 10 lines
fs/io_uring.c +5
-1+int i; + +for (i =0 ; i <ARRAY_SIZE (ctx->sqo_wq); i++) +if (ctx->sqo_wq[i]) +flush_workqueue (ctx->sqo_wq[i]); -io_finish_async (ctx);unix_destruct_scm (skb); }This fails to build as
sqo_wqis a pointer in 5.3, not an arrary. Backporting that array change feels "big" for 5.3, is that needed here, or can this be fixed differently?
Quoted 6 lines
Quoted 3 lines
Yeah, we don't need to do that. It's just a pointer in 5.3, not an array of pointers, so the below should be all we need for 5.3 (and 5.2/5.1).
5.2/5.1 are long end-of-life, but this change looks sane. I'll go queue it up for 5.3.y, thanks for the patch!
Thanks Greg!
Signature · 1 line
Jens Axboe