aboutsummaryrefslogtreecommitdiffstats
path: root/features/rt/block-mq-do-not-invoke-preempt_disable.patch
diff options
context:
space:
mode:
Diffstat (limited to 'features/rt/block-mq-do-not-invoke-preempt_disable.patch')
-rw-r--r--features/rt/block-mq-do-not-invoke-preempt_disable.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/features/rt/block-mq-do-not-invoke-preempt_disable.patch b/features/rt/block-mq-do-not-invoke-preempt_disable.patch
new file mode 100644
index 00000000..c869f8a1
--- /dev/null
+++ b/features/rt/block-mq-do-not-invoke-preempt_disable.patch
@@ -0,0 +1,39 @@
+From daef692486de5a4273e1fdff8121fca46992bc5b 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 134/191] block/mq: do not invoke preempt_disable()
+
+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 | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/block/blk-mq.c b/block/blk-mq.c
+index d4d7c1caa439..2003865f725b 100644
+--- a/block/blk-mq.c
++++ b/block/blk-mq.c
+@@ -1560,14 +1560,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.19.1
+