]> git.baikalelectronics.ru Git - kernel.git/commit
sched: Introduce task block time in schedstats
authorYafang Shao <laoar.shao@gmail.com>
Sun, 5 Sep 2021 14:35:43 +0000 (14:35 +0000)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 5 Oct 2021 13:51:48 +0000 (15:51 +0200)
commit07d4cb4cef4f8a10b487ccc8c020fa82c3d55f94
treedb448af511226f6a3643bb37e0062244ca42aa48
parent3441feeff0f397f13fd6687277c4d2ee9bc1ea3b
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
include/linux/sched.h
kernel/sched/debug.c
kernel/sched/stats.c