-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try operation of linux-6.1.y in Ski with extra patch
- Loading branch information
1 parent
3a428fc
commit 4aa3ed0
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
patches/linux-6.1.y/6259151c04d4e0085e00d2dcb471ebdd1778e72e.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
From 6259151c04d4e0085e00d2dcb471ebdd1778e72e Mon Sep 17 00:00:00 2001 | ||
From: Bart Van Assche <[email protected]> | ||
Date: Thu, 9 May 2024 10:01:48 -0700 | ||
Subject: [PATCH] block: Call .limit_depth() after .hctx has been set | ||
|
||
Call .limit_depth() after data->hctx has been set such that data->hctx can | ||
be used in .limit_depth() implementations. | ||
|
||
Cc: Christoph Hellwig <[email protected]> | ||
Cc: Damien Le Moal <[email protected]> | ||
Cc: Zhiguo Niu <[email protected]> | ||
Fixes: 07757588e507 ("block/mq-deadline: Reserve 25% of scheduler tags for synchronous requests") | ||
Signed-off-by: Bart Van Assche <[email protected]> | ||
Tested-by: Zhiguo Niu <[email protected]> | ||
Reviewed-by: Christoph Hellwig <[email protected]> | ||
Link: https://lore.kernel.org/r/[email protected] | ||
Signed-off-by: Jens Axboe <[email protected]> | ||
--- | ||
block/blk-mq.c | 12 ++++++------ | ||
1 file changed, 6 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/block/blk-mq.c b/block/blk-mq.c | ||
index fec2dea5c6e885..e3c3c0c21b5536 100644 | ||
--- a/block/blk-mq.c | ||
+++ b/block/blk-mq.c | ||
@@ -448,6 +448,10 @@ static struct request *__blk_mq_alloc_requests(struct blk_mq_alloc_data *data) | ||
if (data->cmd_flags & REQ_NOWAIT) | ||
data->flags |= BLK_MQ_REQ_NOWAIT; | ||
|
||
+retry: | ||
+ data->ctx = blk_mq_get_ctx(q); | ||
+ data->hctx = blk_mq_map_queue(q, data->cmd_flags, data->ctx); | ||
+ | ||
if (q->elevator) { | ||
/* | ||
* All requests use scheduler tags when an I/O scheduler is | ||
@@ -469,13 +473,9 @@ static struct request *__blk_mq_alloc_requests(struct blk_mq_alloc_data *data) | ||
if (ops->limit_depth) | ||
ops->limit_depth(data->cmd_flags, data); | ||
} | ||
- } | ||
- | ||
-retry: | ||
- data->ctx = blk_mq_get_ctx(q); | ||
- data->hctx = blk_mq_map_queue(q, data->cmd_flags, data->ctx); | ||
- if (!(data->rq_flags & RQF_SCHED_TAGS)) | ||
+ } else { | ||
blk_mq_tag_busy(data->hctx); | ||
+ } | ||
|
||
if (data->flags & BLK_MQ_REQ_RESERVED) | ||
data->rq_flags |= RQF_RESV; |