summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-06-11 08:44:48 +0200
committerJens Axboe <axboe@kernel.dk>2020-06-24 17:15:57 +0200
commit4c8fc19686dc761f600833fc9b8fa390eaf73dd5 (patch)
treed9841a5a10d369826cceb31ee13a322d16bfa1c4 /block
parentblk-mq: move failure injection out of blk_mq_complete_request (diff)
downloadlinux-4c8fc19686dc761f600833fc9b8fa390eaf73dd5.tar.xz
linux-4c8fc19686dc761f600833fc9b8fa390eaf73dd5.zip
blk-mq: remove the get_cpu/put_cpu pair in blk_mq_complete_request
We don't really care if we get migrated during the I/O completion. In the worth case we either perform an IPI that wasn't required, or complete the request on a CPU which we just migrated off. Reviewed-by: Daniel Wagner <dwagner@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/blk-mq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 3f4f227cf830..95125bfe779b 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -685,7 +685,7 @@ void blk_mq_complete_request(struct request *rq)
return;
}
- cpu = get_cpu();
+ cpu = raw_smp_processor_id();
if (!test_bit(QUEUE_FLAG_SAME_FORCE, &q->queue_flags))
shared = cpus_share_cache(cpu, ctx->cpu);
@@ -697,7 +697,6 @@ void blk_mq_complete_request(struct request *rq)
} else {
__blk_mq_complete_request(rq);
}
- put_cpu();
}
EXPORT_SYMBOL(blk_mq_complete_request);