Skip to content

Commit 4c8fc19

Browse files
Christoph Hellwigaxboe
authored andcommitted
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>
1 parent 15f73f5 commit 4c8fc19

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

block/blk-mq.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ void blk_mq_complete_request(struct request *rq)
685685
return;
686686
}
687687

688-
cpu = get_cpu();
688+
cpu = raw_smp_processor_id();
689689
if (!test_bit(QUEUE_FLAG_SAME_FORCE, &q->queue_flags))
690690
shared = cpus_share_cache(cpu, ctx->cpu);
691691

@@ -697,7 +697,6 @@ void blk_mq_complete_request(struct request *rq)
697697
} else {
698698
__blk_mq_complete_request(rq);
699699
}
700-
put_cpu();
701700
}
702701
EXPORT_SYMBOL(blk_mq_complete_request);
703702

0 commit comments

Comments
 (0)