52 lines
1.4 KiB
Diff
52 lines
1.4 KiB
Diff
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
Subject: block/mq: do not invoke preempt_disable()
|
|
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.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(-)
|
|
|
|
--- a/block/blk-mq.c
|
|
+++ b/block/blk-mq.c
|
|
@@ -362,7 +362,7 @@ static void blk_mq_ipi_complete_request(
|
|
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);
|
|
|
|
@@ -374,7 +374,7 @@ static void blk_mq_ipi_complete_request(
|
|
} else {
|
|
rq->q->softirq_done_fn(rq);
|
|
}
|
|
- put_cpu();
|
|
+ put_cpu_light();
|
|
}
|
|
|
|
void __blk_mq_complete_request(struct request *rq)
|
|
@@ -893,14 +893,14 @@ void blk_mq_run_hw_queue(struct blk_mq_h
|
|
return;
|
|
|
|
if (!async) {
|
|
- 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_schedule_delayed_work_on(blk_mq_hctx_next_cpu(hctx),
|