ANDROID: blk-mq: Run zoned blocking queues asynchronously

Enabling BLK_MQ_F_BLOCKING for the UFS driver caused a performance
regression (https://b.corp.google.com/issues/296262215). The patch that
fixed that performance regression broke zoned UFS ("BACKPORT: FROMGIT:
block: Improve performance for BLK_MQ_F_BLOCKING drivers"). Until a
better fix is available, unbreak ZUFS by running zoned queues
asynchronously.

Bug: 297542570
Change-Id: I621586ec40b43f5d9ad33675020b8bcfb938f293
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
Bart Van Assche
2023-08-30 16:49:10 -07:00
committed by Treehugger Robot
parent be1b509d81
commit 347a154da8

View File

@@ -1561,7 +1561,10 @@ static void __blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async,
if (unlikely(blk_mq_hctx_stopped(hctx)))
return;
if (!async && cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask)) {
if (!async &&
!(hctx->flags & BLK_MQ_F_BLOCKING &&
blk_queue_is_zoned(hctx->queue)) &&
cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask)) {
__blk_mq_run_hw_queue(hctx);
return;
}