summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYafang Shao <laoar.shao@gmail.com>2021-09-05 14:35:43 +0000
committerPeter Zijlstra <peterz@infradead.org>2021-10-05 15:51:48 +0200
commit847fc0cd0664fcb2a08ac66df6b85935361ec454 (patch)
treedb448af511226f6a3643bb37e0062244ca42aa48 /include
parent60f2415e19d3948641149ac6aca137a7be1d1952 (diff)
sched: Introduce task block time in schedstats
Currently in schedstats we have sum_sleep_runtime and iowait_sum, but there's no metric to show how long the task is in D state. Once a task in D state, it means the task is blocked in the kernel, for example the task may be waiting for a mutex. The D state is more frequent than iowait, and it is more critital than S state. So it is worth to add a metric to measure it. Signed-off-by: Yafang Shao <laoar.shao@gmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20210905143547.4668-5-laoar.shao@gmail.com
Diffstat (limited to 'include')
-rw-r--r--include/linux/sched.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 2bc4c72fec2d..193e16e2d0e4 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -503,6 +503,8 @@ struct sched_statistics {
u64 block_start;
u64 block_max;
+ s64 sum_block_runtime;
+
u64 exec_max;
u64 slice_max;