Patch "Revert "block/mq-deadline: use correct way to throttling write requests"" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    Revert "block/mq-deadline: use correct way to throttling write requests"

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     revert-block-mq-deadline-use-correct-way-to-throttli.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5a779abcda49fcd13bd471baf7ef4709c7388f71
Author: Bart Van Assche <bvanassche@xxxxxxx>
Date:   Wed Mar 13 14:42:18 2024 -0700

    Revert "block/mq-deadline: use correct way to throttling write requests"
    
    [ Upstream commit 256aab46e31683d76d45ccbedc287b4d3f3e322b ]
    
    The code "max(1U, 3 * (1U << shift)  / 4)" comes from the Kyber I/O
    scheduler. The Kyber I/O scheduler maintains one internal queue per hwq
    and hence derives its async_depth from the number of hwq tags. Using
    this approach for the mq-deadline scheduler is wrong since the
    mq-deadline scheduler maintains one internal queue for all hwqs
    combined. Hence this revert.
    
    Cc: stable@xxxxxxxxxxxxxxx
    Cc: Damien Le Moal <dlemoal@xxxxxxxxxx>
    Cc: Harshit Mogalapalli <harshit.m.mogalapalli@xxxxxxxxxx>
    Cc: Zhiguo Niu <Zhiguo.Niu@xxxxxxxxxx>
    Fixes: d47f9717e5cf ("block/mq-deadline: use correct way to throttling write requests")
    Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
    Link: https://lore.kernel.org/r/20240313214218.1736147-1-bvanassche@xxxxxxx
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/block/mq-deadline.c b/block/mq-deadline.c
index f958e79277b8b..02a916ba62ee7 100644
--- a/block/mq-deadline.c
+++ b/block/mq-deadline.c
@@ -646,9 +646,8 @@ static void dd_depth_updated(struct blk_mq_hw_ctx *hctx)
 	struct request_queue *q = hctx->queue;
 	struct deadline_data *dd = q->elevator->elevator_data;
 	struct blk_mq_tags *tags = hctx->sched_tags;
-	unsigned int shift = tags->bitmap_tags.sb.shift;
 
-	dd->async_depth = max(1U, 3 * (1U << shift)  / 4);
+	dd->async_depth = max(1UL, 3 * q->nr_requests / 4);
 
 	sbitmap_queue_min_shallow_depth(&tags->bitmap_tags, dd->async_depth);
 }




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux