mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
blk-mq: Do not wake idle CPUs to queue same-origin requests
Same-origin requests are great for cache locality, but in the case where the origin CPU is already idle (i.e. the task his migrated), waking it to process a block request is inefficient for power management. Since the currently executing CPU is not considered idle, it would be more power efficient to miss the cache hit and avoid waking an idle CPU. Change-Id: Id8b581e4149c1d6afc73e492392d0edaf32e0266 Signed-off-by: Tyler Nijmeh <tylernij@gmail.com> Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This commit is contained in:
parent
6f0859c5bf
commit
06c6147719
@ -556,7 +556,8 @@ static void __blk_mq_complete_request(struct request *rq)
|
||||
}
|
||||
|
||||
cpu = get_cpu();
|
||||
if (!test_bit(QUEUE_FLAG_SAME_FORCE, &rq->q->queue_flags))
|
||||
if (!test_bit(QUEUE_FLAG_SAME_FORCE, &rq->q->queue_flags) ||
|
||||
idle_cpu(ctx->cpu))
|
||||
shared = cpus_share_cache(cpu, ctx->cpu);
|
||||
|
||||
if (cpu != ctx->cpu && !shared && cpu_online(ctx->cpu)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user