[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221102123956.230-6-Yuwei.Guan@zeekrlife.com>
Date: Wed, 2 Nov 2022 20:39:56 +0800
From: Yuwei Guan <ssawgyw@...il.com>
To: paolo.valente@...aro.org, axboe@...nel.dk
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
Yuwei.Guan@...krlife.com
Subject: [PATCH 5/5] block, bfq: print bfqq addr for each bfq_log_bfqq log
Print bfqq addr for each bfq_log_bfqq log, which can improve readability
of bfq log.
Signed-off-by: Yuwei Guan <Yuwei.Guan@...krlife.com>
---
block/bfq-iosched.c | 15 +++++++--------
block/bfq-iosched.h | 4 +++-
block/bfq-wf2q.c | 3 +--
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 9c626fba41c8..432c5337d7c2 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -5253,7 +5253,7 @@ void bfq_put_queue(struct bfq_queue *bfqq)
struct hlist_node *n;
struct bfq_group *bfqg = bfqq_group(bfqq);
- bfq_log_bfqq(bfqq->bfqd, bfqq, "put_queue: %p %d", bfqq, bfqq->ref);
+ bfq_log_bfqq(bfqq->bfqd, bfqq, "put_queue: ref %d", bfqq->ref);
bfqq->ref--;
if (bfqq->ref)
@@ -5356,7 +5356,7 @@ static void bfq_exit_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq)
bfq_schedule_dispatch(bfqd);
}
- bfq_log_bfqq(bfqd, bfqq, "exit_bfqq: %p, %d", bfqq, bfqq->ref);
+ bfq_log_bfqq(bfqd, bfqq, "exit_bfqq: ref %d", bfqq->ref);
bfq_put_cooperator(bfqq);
@@ -5772,8 +5772,8 @@ static struct bfq_queue *bfq_get_queue(struct bfq_data *bfqd,
* guarantee that this queue is not freed
* until its group goes away.
*/
- bfq_log_bfqq(bfqd, bfqq, "get_queue, bfqq not in async: %p, %d",
- bfqq, bfqq->ref);
+ bfq_log_bfqq(bfqd, bfqq, "get_queue, bfqq not in async: ref %d",
+ bfqq->ref);
*async_bfqq = bfqq;
}
@@ -6803,8 +6803,8 @@ static struct bfq_queue *bfq_init_rq(struct request *rq)
bfqq_request_allocated(bfqq);
bfqq->ref++;
bic->requests++;
- bfq_log_bfqq(bfqd, bfqq, "get_request %p: bfqq %p, %d",
- rq, bfqq, bfqq->ref);
+ bfq_log_bfqq(bfqd, bfqq, "get_request %p: bfqq ref %d",
+ rq, bfqq->ref);
rq->elv.priv[0] = bic;
rq->elv.priv[1] = bfqq;
@@ -6936,8 +6936,7 @@ static void __bfq_put_async_bfqq(struct bfq_data *bfqd,
if (bfqq) {
bfq_bfqq_move(bfqd, bfqq, bfqd->root_group);
- bfq_log_bfqq(bfqd, bfqq, "put_async_bfqq: putting %p, %d",
- bfqq, bfqq->ref);
+ bfq_log_bfqq(bfqd, bfqq, "put_async_bfqq: ref %d", bfqq->ref);
bfq_put_queue(bfqq);
*bfqq_ptr = NULL;
}
diff --git a/block/bfq-iosched.h b/block/bfq-iosched.h
index 71f721670ab6..8851ffcb7a0d 100644
--- a/block/bfq-iosched.h
+++ b/block/bfq-iosched.h
@@ -24,7 +24,7 @@
#define BFQ_DEFAULT_GRP_IOPRIO 0
#define BFQ_DEFAULT_GRP_CLASS IOPRIO_CLASS_BE
-#define MAX_BFQQ_NAME_LENGTH 16
+#define MAX_BFQQ_NAME_LENGTH 32
/*
* Soft real-time applications are extremely more latency sensitive
@@ -1090,6 +1090,8 @@ static inline void bfq_bfqq_name(struct bfq_queue *bfqq, char *str, int len)
snprintf(str, len, "bfq%d%c", bfqq->pid, type);
else
snprintf(str, len, "bfqSHARED-%c", type);
+
+ snprintf(str, len, "%s %p", str, bfqq);
}
#ifdef CONFIG_BFQ_GROUP_IOSCHED
diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c
index f57ed0b037f3..7ab4094af35a 100644
--- a/block/bfq-wf2q.c
+++ b/block/bfq-wf2q.c
@@ -513,8 +513,7 @@ static void bfq_get_entity(struct bfq_entity *entity)
if (bfqq) {
bfqq->ref++;
- bfq_log_bfqq(bfqq->bfqd, bfqq, "get_entity: %p %d",
- bfqq, bfqq->ref);
+ bfq_log_bfqq(bfqq->bfqd, bfqq, "get_entity: ref %d", bfqq->ref);
}
}
--
2.34.1
Powered by blists - more mailing lists