Message ID | 20201226102808.2534966-3-yukuai3@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fix the performance fluctuation due to shared tagset | expand |
diff --git a/block/blk-mq.h b/block/blk-mq.h index f7212bacfa56..228c5c442be4 100644 --- a/block/blk-mq.h +++ b/block/blk-mq.h @@ -212,8 +212,10 @@ static inline void __blk_mq_dec_active_requests(struct blk_mq_hw_ctx *hctx) { if (blk_mq_is_sbitmap_shared(hctx->flags)) atomic_dec(&hctx->queue->nr_active_requests_shared_sbitmap); - else if (!atomic_dec_return(&hctx->nr_active)) + else if (!atomic_dec_return(&hctx->nr_active)) { + blk_mq_tag_idle(hctx); blk_mq_dtag_idle(hctx); + } } static inline int __blk_mq_active_requests(struct blk_mq_hw_ctx *hctx)