Messages in this thread Patch in this message | | | From | Yuwei Guan <> | Subject | [PATCH 2/5] block, bfq: do bfq_set_next_ioprio_data() after setting sync mode and pid | Date | Wed, 2 Nov 2022 20:39:53 +0800 |
| |
Do bfq_set_next_ioprio_data() after setting sync mode and pid for bfqq in bfq_init_bfqq(), which can print real pid and sync info for bfq_log_bfqq log in bfq_set_next_ioprio_data().
such as, before: "bfq0A new_ioprio 4 new_weight 40" after: "bfq203S new_ioprio 4 new_weight 40"
Signed-off-by: Yuwei Guan <Yuwei.Guan@zeekrlife.com> --- block/bfq-iosched.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 7a15b2689cb8..e00c67a01b09 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -5509,9 +5509,6 @@ static void bfq_init_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq, bfqq->ref = 0; bfqq->bfqd = bfqd; - if (bic) - bfq_set_next_ioprio_data(bfqq, bic); - if (is_sync) { /* * No need to mark as has_short_ttime if in @@ -5537,6 +5534,9 @@ static void bfq_init_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq, bfqq->pid = pid; + if (bic) + bfq_set_next_ioprio_data(bfqq, bic); + /* Tentative initial value to trade off between thr and lat */ bfqq->max_budget = (2 * bfq_max_budget(bfqd)) / 3; bfqq->budget_timeout = bfq_smallest_from_now(); -- 2.34.1
| |