Commit 7c1ee704 authored by Tejun Heo's avatar Tejun Heo Committed by Jens Axboe

iocost_monitor: Report debt

Report debt and rename del_ms row to delay for consistency.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent b06f2d35
...@@ -161,9 +161,9 @@ ...@@ -161,9 +161,9 @@
* https://github.com/osandov/drgn. The ouput looks like the following. * https://github.com/osandov/drgn. The ouput looks like the following.
* *
* sdb RUN per=300ms cur_per=234.218:v203.695 busy= +1 vrate= 62.12% * sdb RUN per=300ms cur_per=234.218:v203.695 busy= +1 vrate= 62.12%
* active weight hweight% inflt% del_ms usages% * active weight hweight% inflt% dbt delay usages%
* test/a * 50/ 50 33.33/ 33.33 27.65 0*041 033:033:033 * test/a * 50/ 50 33.33/ 33.33 27.65 2 0*041 033:033:033
* test/b * 100/ 100 66.67/ 66.67 17.56 0*000 066:079:077 * test/b * 100/ 100 66.67/ 66.67 17.56 0 0*000 066:079:077
* *
* - per : Timer period * - per : Timer period
* - cur_per : Internal wall and device vtime clock * - cur_per : Internal wall and device vtime clock
......
...@@ -135,7 +135,7 @@ class IocStat: ...@@ -135,7 +135,7 @@ class IocStat:
def table_header_str(self): def table_header_str(self):
return f'{"":25} active {"weight":>9} {"hweight%":>13} {"inflt%":>6} ' \ return f'{"":25} active {"weight":>9} {"hweight%":>13} {"inflt%":>6} ' \
f'{"del_ms":>6} {"usages%"}' f'{"dbt":>3} {"delay":>6} {"usages%"}'
class IocgStat: class IocgStat:
def __init__(self, iocg): def __init__(self, iocg):
...@@ -159,6 +159,7 @@ class IocgStat: ...@@ -159,6 +159,7 @@ class IocgStat:
else: else:
self.inflight_pct = 0 self.inflight_pct = 0
self.debt_ms = iocg.abs_vdebt.counter.value_() / VTIME_PER_USEC / 1000
self.use_delay = blkg.use_delay.counter.value_() self.use_delay = blkg.use_delay.counter.value_()
self.delay_ms = blkg.delay_nsec.counter.value_() / 1_000_000 self.delay_ms = blkg.delay_nsec.counter.value_() / 1_000_000
...@@ -181,6 +182,7 @@ class IocgStat: ...@@ -181,6 +182,7 @@ class IocgStat:
'hweight_active_pct' : str(self.hwa_pct), 'hweight_active_pct' : str(self.hwa_pct),
'hweight_inuse_pct' : str(self.hwi_pct), 'hweight_inuse_pct' : str(self.hwi_pct),
'inflight_pct' : str(self.inflight_pct), 'inflight_pct' : str(self.inflight_pct),
'debt_ms' : str(self.debt_ms),
'use_delay' : str(self.use_delay), 'use_delay' : str(self.use_delay),
'delay_ms' : str(self.delay_ms), 'delay_ms' : str(self.delay_ms),
'usage_pct' : str(self.usage), 'usage_pct' : str(self.usage),
...@@ -195,6 +197,7 @@ class IocgStat: ...@@ -195,6 +197,7 @@ class IocgStat:
f'{self.inuse:5}/{self.active:5} ' \ f'{self.inuse:5}/{self.active:5} ' \
f'{self.hwi_pct:6.2f}/{self.hwa_pct:6.2f} ' \ f'{self.hwi_pct:6.2f}/{self.hwa_pct:6.2f} ' \
f'{self.inflight_pct:6.2f} ' \ f'{self.inflight_pct:6.2f} ' \
f'{min(math.ceil(self.debt_ms), 999):3} ' \
f'{min(self.use_delay, 99):2}*'\ f'{min(self.use_delay, 99):2}*'\
f'{min(math.ceil(self.delay_ms), 999):03} ' f'{min(math.ceil(self.delay_ms), 999):03} '
for u in self.usages: for u in self.usages:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment