From: chengming.zhou@linux.dev
To: axboe@kernel.dk, tj@kernel.org
Cc: linux-kernel@vger.kernel.org, zhouchengming@bytedance.com
Subject: [PATCH 1/3] iocost_monitor: fix kernel queue kobj changes
Date: Fri, 4 Aug 2023 14:50:37 +0800 [thread overview]
Message-ID: <20230804065039.8885-1-chengming.zhou@linux.dev> (raw)
From: Chengming Zhou <zhouchengming@bytedance.com>
When I use iocost_monitor on nvme0n1, this error shows up:
"Could not find ioc for nvme0n1"
There is no kobj in struct queue in recent kernel, it seems that the commit
2bd85221a625 ("block: untangle request_queue refcounting from sysfs")
move the queue kobj to struct gendisk.
Fix it by using mq_kobj which is at the same level with queue kobj.
Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
---
tools/cgroup/iocost_monitor.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/cgroup/iocost_monitor.py b/tools/cgroup/iocost_monitor.py
index 0dbbc67400fc..7aa076cb559e 100644
--- a/tools/cgroup/iocost_monitor.py
+++ b/tools/cgroup/iocost_monitor.py
@@ -221,7 +221,7 @@ ioc = None
for i, ptr in radix_tree_for_each(blkcg_root.blkg_tree.address_of_()):
blkg = drgn.Object(prog, 'struct blkcg_gq', address=ptr)
try:
- if devname == blkg.q.kobj.parent.name.string_().decode('utf-8'):
+ if devname == blkg.q.mq_kobj.parent.name.string_().decode('utf-8'):
q_id = blkg.q.id.value_()
if blkg.pd[plid]:
root_iocg = container_of(blkg.pd[plid], 'struct ioc_gq', 'pd')
--
2.41.0
next reply other threads:[~2023-08-04 6:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-04 6:50 chengming.zhou [this message]
2023-08-04 6:50 ` [PATCH 2/3] iocost_monitor: print vrate inuse along with base_vrate chengming.zhou
2023-08-04 6:50 ` [PATCH 3/3] iocost_monitor: improve it by adding iocg wait_ms chengming.zhou
2023-08-07 18:34 ` Tejun Heo
2023-08-08 21:46 ` [PATCH 1/3] iocost_monitor: fix kernel queue kobj changes Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230804065039.8885-1-chengming.zhou@linux.dev \
--to=chengming.zhou@linux.dev \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=zhouchengming@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox