summaryrefslogtreecommitdiff
path: root/tools/cgroup/iocost_monitor.py
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2020-05-29 18:10:09 +0300
committerJoerg Roedel <jroedel@suse.de>2020-05-29 18:10:09 +0300
commit4c201d58cfee8631350888bad9e8bae33e628605 (patch)
treea49a020d48af561d030b7d4869d193148b5a8088 /tools/cgroup/iocost_monitor.py
parent555fb5ae0f39962417d35e02d77ee9b2c14a5428 (diff)
parent9cb1fd0efd195590b828b9b865421ad345a4a145 (diff)
downloadlinux-4c201d58cfee8631350888bad9e8bae33e628605.tar.xz
Merge tag 'v5.7-rc7' into x86/amd
Linux 5.7-rc7
Diffstat (limited to 'tools/cgroup/iocost_monitor.py')
-rw-r--r--tools/cgroup/iocost_monitor.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/cgroup/iocost_monitor.py b/tools/cgroup/iocost_monitor.py
index 7427a5ee761b..9d8e9613008a 100644
--- a/tools/cgroup/iocost_monitor.py
+++ b/tools/cgroup/iocost_monitor.py
@@ -159,7 +159,12 @@ class IocgStat:
else:
self.inflight_pct = 0
- self.debt_ms = iocg.abs_vdebt.counter.value_() / VTIME_PER_USEC / 1000
+ # vdebt used to be an atomic64_t and is now u64, support both
+ try:
+ self.debt_ms = iocg.abs_vdebt.counter.value_() / VTIME_PER_USEC / 1000
+ except:
+ self.debt_ms = iocg.abs_vdebt.value_() / VTIME_PER_USEC / 1000
+
self.use_delay = blkg.use_delay.counter.value_()
self.delay_ms = blkg.delay_nsec.counter.value_() / 1_000_000