Re: [PATCH] sched: Include group statistics in /proc/sched_debug

From: Peter Zijlstra
Date: Mon Nov 10 2008 - 04:29:40 EST


On Mon, 2008-11-10 at 14:53 +0530, Bharata B Rao wrote:
> Include group statistics in /proc/sched_debug.
>
> Since the statistics of a group entity isn't exported directly from the
> kernel, it becomes difficult to obtain some of the group statistics.
> For example, the current method to obtain exec time of a group entity
> is not always accurate. One has to read the exec times of all
> the tasks(/proc/<pid>/sched) in the group and add them. This method
> fails (or becomes difficult) if we want to collect stats of a group over
> a duration where tasks get created and terminated.
>
> This patch makes it easier to obtain group stats by directly including
> them in /proc/sched_debug. Stats like group exec time would help user
> programs (like LTP) to accurately measure the group fairness.
>
> Signed-off-by: Bharata B Rao <bharata@xxxxxxxxxxxxxxxxxx>
> CC: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
> CC: Ingo Molnar <mingo@xxxxxxx>
> CC: Srivatsa Vaddagiri <vatsa@xxxxxxxxxxxxxxxxxx>
> ---

<snip patch>

> An extract of /proc/sched_debug showing group stats obtained from
> this patch:
>
> group[1]:/3/a/1
> .se->exec_start : 256484.781577
> .se->vruntime : 12868.176994
> .se->sum_exec_runtime : 3243.669709
> .se->wait_start : 0.000000
> .se->sleep_start : 0.000000
> .se->block_start : 0.000000
> .se->sleep_max : 0.000000
> .se->block_max : 0.000000
> .se->exec_max : 1.002095
> .se->slice_max : 13.997073
> .se->wait_max : 67.978322
> .se->wait_sum : 7141.676906
> .se->wait_count : 203
> .se->load.weight : 255

Why not simply add them to the cfs_rq[n]:/path sections we already have?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/