summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0283-revert-block.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:02:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:02:38 +0000
commit08b74a000942a380fe028845f92cd3a0dee827d5 (patch)
treeaa78b4e12607c3e1fcce8d5cc42df4330792f118 /debian/patches-rt/0283-revert-block.patch
parentAdding upstream version 4.19.249. (diff)
downloadlinux-08b74a000942a380fe028845f92cd3a0dee827d5.tar.xz
linux-08b74a000942a380fe028845f92cd3a0dee827d5.zip
Adding debian version 4.19.249-2.debian/4.19.249-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--debian/patches-rt/0283-revert-block.patch83
1 files changed, 83 insertions, 0 deletions
diff --git a/debian/patches-rt/0283-revert-block.patch b/debian/patches-rt/0283-revert-block.patch
new file mode 100644
index 000000000..71ddf1806
--- /dev/null
+++ b/debian/patches-rt/0283-revert-block.patch
@@ -0,0 +1,83 @@
+From aceaba22f9a9db0bf15d1a63ca7d08080314f7b0 Mon Sep 17 00:00:00 2001
+From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
+Date: Fri, 20 Sep 2019 17:50:54 -0400
+Subject: [PATCH 283/347] revert-block
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.246-rt110.tar.xz
+
+Revert swork version of: block: blk-mq: move blk_queue_usage_counter_release() into process context
+
+In order to switch to upstream, we need to revert the swork code.
+
+Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
+---
+ block/blk-core.c | 14 +-------------
+ include/linux/blkdev.h | 2 --
+ 2 files changed, 1 insertion(+), 15 deletions(-)
+
+diff --git a/block/blk-core.c b/block/blk-core.c
+index 02835970ef1e..461a93c08c14 100644
+--- a/block/blk-core.c
++++ b/block/blk-core.c
+@@ -973,21 +973,12 @@ void blk_queue_exit(struct request_queue *q)
+ percpu_ref_put(&q->q_usage_counter);
+ }
+
+-static void blk_queue_usage_counter_release_swork(struct swork_event *sev)
+-{
+- struct request_queue *q =
+- container_of(sev, struct request_queue, mq_pcpu_wake);
+-
+- wake_up_all(&q->mq_freeze_wq);
+-}
+-
+ static void blk_queue_usage_counter_release(struct percpu_ref *ref)
+ {
+ struct request_queue *q =
+ container_of(ref, struct request_queue, q_usage_counter);
+
+- if (wq_has_sleeper(&q->mq_freeze_wq))
+- swork_queue(&q->mq_pcpu_wake);
++ wake_up_all(&q->mq_freeze_wq);
+ }
+
+ static void blk_rq_timed_out_timer(struct timer_list *t)
+@@ -1087,7 +1078,6 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id,
+ queue_flag_set_unlocked(QUEUE_FLAG_BYPASS, q);
+
+ init_waitqueue_head(&q->mq_freeze_wq);
+- INIT_SWORK(&q->mq_pcpu_wake, blk_queue_usage_counter_release_swork);
+
+ /*
+ * Init percpu_ref in atomic mode so that it's faster to shutdown.
+@@ -3977,8 +3967,6 @@ int __init blk_dev_init(void)
+ if (!kblockd_workqueue)
+ panic("Failed to create kblockd\n");
+
+- BUG_ON(swork_get());
+-
+ request_cachep = kmem_cache_create("blkdev_requests",
+ sizeof(struct request), 0, SLAB_PANIC, NULL);
+
+diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
+index 0313098a428d..39d90bf9b5fa 100644
+--- a/include/linux/blkdev.h
++++ b/include/linux/blkdev.h
+@@ -27,7 +27,6 @@
+ #include <linux/percpu-refcount.h>
+ #include <linux/scatterlist.h>
+ #include <linux/blkzoned.h>
+-#include <linux/swork.h>
+
+ struct module;
+ struct scsi_ioctl_command;
+@@ -665,7 +664,6 @@ struct request_queue {
+ #endif
+ struct rcu_head rcu_head;
+ wait_queue_head_t mq_freeze_wq;
+- struct swork_event mq_pcpu_wake;
+ struct percpu_ref q_usage_counter;
+ struct list_head all_q_node;
+
+--
+2.36.1
+