Skip to content

Commit

Permalink
blk-mq: remove the get_cpu/put_cpu pair in blk_mq_complete_request
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Jun 24, 2020
1 parent 15f73f5 commit 4c8fc19
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand Down

0 comments on commit 4c8fc19

Please sign in to comment.