Re: [tip:sched/core] sched: Add wait, sleep and iowait accounting tracepoints

Ingo Molnar
2009-08-03T13:24:51Z

* tip-bot for Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:

> Commit-ID: 5f3e60fb2a0e05cdaf9b59acb0bb249bb1e96362
> Gitweb: http://git.kernel.org/tip/5f3e60fb2a0e05cdaf9b59acb0bb249bb1e96362
> Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
> AuthorDate: Thu, 23 Jul 2009 20:13:26 +0200
> Committer: Ingo Molnar <mingo@elte.hu>
> CommitDate: Mon, 3 Aug 2009 14:35:37 +0200

> --- a/kernel/sched_fair.c
> +++ b/kernel/sched_fair.c
> @@ -546,6 +546,11 @@ update_stats_wait_end(struct cfs_rq *cfs_rq, struct sched_entity *se)
> schedstat_set(se->wait_sum, se->wait_sum +
> rq_of(cfs_rq)->clock - se->wait_start);
> schedstat_set(se->wait_start, 0);
> +
> + if (entity_is_task(se)) {
> + trace_sched_stat_wait(task_of(se),
> + rq_of(cfs_rq)->clock - se->wait_start);
> + }

FYI, this doesnt build with !SCHEDSTATS. I suspect we shold maintain
se->wait_start unconditionally.

Ingo