[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1338373759.26856.238.camel@twins>
Date: Wed, 30 May 2012 12:29:19 +0200
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Glauber Costa <glommer@...allels.com>
Cc: linux-kernel@...r.kernel.org, cgroups@...r.kernel.org,
devel@...nvz.org, Paul Turner <pjt@...gle.com>,
Tejun Heo <tj@...nel.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>, handai.szj@...il.com,
Andrew.Phillips@...x.com, Serge Hallyn <serge.hallyn@...onical.com>
Subject: Re: [PATCH v3 1/6] measure exec_clock for rt sched entities
On Wed, 2012-05-30 at 13:48 +0400, Glauber Costa wrote:
> For simetry with the cfq tasks, measure exec_clock for the rt
> sched entities (rt_se).
Symmetry methinks.. anyway, where is the symmetry?, fair.c:update_curr()
doesn't do the for_each_sched_entity() thing.
> This can be used in a number of fashions. For instance, to
> compute total cpu usage in a cgroup that is generated by
> rt tasks.
>
> Signed-off-by: Glauber Costa <glommer@...allels.com>
> CC: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> CC: Paul Turner <pjt@...gle.com>
> ---
> kernel/sched/rt.c | 5 +++++
> kernel/sched/sched.h | 1 +
> 2 files changed, 6 insertions(+)
>
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index c5565c3..30ee4e2 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -919,6 +919,11 @@ static void update_curr_rt(struct rq *rq)
>
> sched_rt_avg_update(rq, delta_exec);
>
> + for_each_sched_rt_entity(rt_se) {
> + rt_rq = rt_rq_of_se(rt_se);
> + schedstat_add(rt_rq, exec_clock, delta_exec);
> + }
> +
> if (!rt_bandwidth_enabled())
> return;
See, this just makes me sad.. you now have a double
for_each_sched_rt_entity() loop.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists