diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2015-07-14 14:26:34 +0200 |
---|---|---|
committer | Luis Claudio R. Goncalves <lgoncalv@redhat.com> | 2021-10-11 07:51:19 -0300 |
commit | 8accdcd06308218a57dddcce0cfb5ace09c095dd (patch) | |
tree | da4e89bd33c5d49887888c3eae95b2b0a1c8295a | |
parent | e1dbc17f0afc51deb513c5ef059c70c9fce71b4f (diff) | |
download | linux-rt-8accdcd06308218a57dddcce0cfb5ace09c095dd.tar.gz |
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>
-rw-r--r-- | block/blk-mq.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index e0ed7317e98c..1ccd5ac444ea 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -363,7 +363,7 @@ static void blk_mq_ipi_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); @@ -375,7 +375,7 @@ static void blk_mq_ipi_complete_request(struct request *rq) } else { rq->q->softirq_done_fn(rq); } - put_cpu(); + put_cpu_light(); } static void __blk_mq_complete_request(struct request *rq) @@ -906,14 +906,14 @@ void blk_mq_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_schedule_work_on(blk_mq_hctx_next_cpu(hctx), &hctx->run_work); |