block/blk-mq: Don't complete locally if capacities are different
[linux-2.6-microblaze.git] / block / blk-mq.c
index 45f994c..7111bd4 100644 (file)
@@ -1166,10 +1166,11 @@ static inline bool blk_mq_complete_need_ipi(struct request *rq)
        if (force_irqthreads())
                return false;
 
-       /* same CPU or cache domain?  Complete locally */
+       /* same CPU or cache domain and capacity?  Complete locally */
        if (cpu == rq->mq_ctx->cpu ||
            (!test_bit(QUEUE_FLAG_SAME_FORCE, &rq->q->queue_flags) &&
-            cpus_share_cache(cpu, rq->mq_ctx->cpu)))
+            cpus_share_cache(cpu, rq->mq_ctx->cpu) &&
+            cpus_equal_capacity(cpu, rq->mq_ctx->cpu)))
                return false;
 
        /* don't try to IPI to an offline CPU */