summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0179-block-mq-do-not-invoke-preempt_disable.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches-rt/0179-block-mq-do-not-invoke-preempt_disable.patch')
-rw-r--r--debian/patches-rt/0179-block-mq-do-not-invoke-preempt_disable.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/debian/patches-rt/0179-block-mq-do-not-invoke-preempt_disable.patch b/debian/patches-rt/0179-block-mq-do-not-invoke-preempt_disable.patch
new file mode 100644
index 000000000..c6d47b2d4
--- /dev/null
+++ b/debian/patches-rt/0179-block-mq-do-not-invoke-preempt_disable.patch
@@ -0,0 +1,58 @@
+From 438290ebaac377f499a9c17e07ffa735ff6db1c2 Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Tue, 14 Jul 2015 14:26:34 +0200
+Subject: [PATCH 179/347] block/mq: do not invoke preempt_disable()
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.246-rt110.tar.xz
+
+preempt_disable() and get_cpu() don't play well together with the sleeping
+locks it tries to allocate later.
+It seems to be enough to replace it with get_cpu_light() and migrate_disable().
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ block/blk-mq.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/block/blk-mq.c b/block/blk-mq.c
+index ffa97d90bde9..ea41d67e4db5 100644
+--- a/block/blk-mq.c
++++ b/block/blk-mq.c
+@@ -570,7 +570,7 @@ static void __blk_mq_complete_request(struct request *rq)
+ return;
+ }
+
+- cpu = get_cpu();
++ cpu = get_cpu_light();
+ if (!test_bit(QUEUE_FLAG_SAME_FORCE, &rq->q->queue_flags))
+ shared = cpus_share_cache(cpu, ctx->cpu);
+
+@@ -582,7 +582,7 @@ static void __blk_mq_complete_request(struct request *rq)
+ } else {
+ rq->q->softirq_done_fn(rq);
+ }
+- put_cpu();
++ put_cpu_light();
+ }
+
+ static void hctx_unlock(struct blk_mq_hw_ctx *hctx, int srcu_idx)
+@@ -1387,14 +1387,14 @@ static void __blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async,
+ return;
+
+ if (!async && !(hctx->flags & BLK_MQ_F_BLOCKING)) {
+- int cpu = get_cpu();
++ int cpu = get_cpu_light();
+ if (cpumask_test_cpu(cpu, hctx->cpumask)) {
+ __blk_mq_run_hw_queue(hctx);
+- put_cpu();
++ put_cpu_light();
+ return;
+ }
+
+- put_cpu();
++ put_cpu_light();
+ }
+
+ kblockd_mod_delayed_work_on(blk_mq_hctx_next_cpu(hctx), &hctx->run_work,
+--
+2.36.1
+