[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54356E91.10804@arm.com>
Date: Wed, 08 Oct 2014 18:04:17 +0100
From: Dietmar Eggemann <dietmar.eggemann@....com>
To: Vincent Guittot <vincent.guittot@...aro.org>,
"peterz@...radead.org" <peterz@...radead.org>,
"mingo@...nel.org" <mingo@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"preeti@...ux.vnet.ibm.com" <preeti@...ux.vnet.ibm.com>,
Morten Rasmussen <Morten.Rasmussen@....com>,
"kamalesh@...ux.vnet.ibm.com" <kamalesh@...ux.vnet.ibm.com>,
"linux@....linux.org.uk" <linux@....linux.org.uk>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
CC: "riel@...hat.com" <riel@...hat.com>,
"efault@....de" <efault@....de>,
"nicolas.pitre@...aro.org" <nicolas.pitre@...aro.org>,
"linaro-kernel@...ts.linaro.org" <linaro-kernel@...ts.linaro.org>,
"daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>,
"pjt@...gle.com" <pjt@...gle.com>,
"bsegall@...gle.com" <bsegall@...gle.com>
Subject: Re: [PATCH v7 3/7] sched: add utilization_avg_contrib
On 07/10/14 13:13, Vincent Guittot wrote:
> Add new statistics which reflect the average time a task is running on the CPU
> and the sum of these running time of the tasks on a runqueue. The latter is
> named utilization_avg_contrib.
>
> This patch is based on the usage metric that was proposed in the 1st
> versions of the per-entity load tracking patchset by Paul Turner
> <pjt@...gle.com> but that has be removed afterward. This version differs
> from the original one in the sense that it's not linked to task_group.
>
> The rq's utilization_avg_contrib will be used to check if a rq is overloaded
> or not instead of trying to compute how many task a group of CPUs can handle
>
> Rename runnable_avg_period into avg_period as it is now used with both
> runnable_avg_sum and running_avg_sum
>
> Add some descriptions of the variables to explain their differences
>
> Signed-off-by: Vincent Guittot <vincent.guittot@...aro.org>
> ---
> include/linux/sched.h | 21 +++++++++++++---
> kernel/sched/debug.c | 9 ++++---
> kernel/sched/fair.c | 70 +++++++++++++++++++++++++++++++++++++++------------
> kernel/sched/sched.h | 8 +++++-
> 4 files changed, 84 insertions(+), 24 deletions(-)
>
[...]
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 9075dee..d6de526 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -678,8 +678,8 @@ void init_task_runnable_average(struct task_struct *p)
>
> p->se.avg.decay_count = 0;
> slice = sched_slice(task_cfs_rq(p), &p->se) >> 10;
> - p->se.avg.runnable_avg_sum = slice;
> - p->se.avg.runnable_avg_period = slice;
> + p->se.avg.runnable_avg_sum = p->se.avg.running_avg_sum = slice;
> + p->se.avg.avg_period = slice;
> __update_task_entity_contrib(&p->se);
Didn't you miss a call to __update_task_entity_utilization here?
Another thing from the naming perspective: You use the term
'utilization' for 'load' (e.g. existing __update_entity_load_avg_contrib
versus new __update_entity_utilization_avg_contrib) but for the
__update_task_entity_contrib function, you use the term 'utilization'
for 'contrib'. IMHO, kind of hard to grasp.
> }
> #else
> @@ -1548,7 +1548,7 @@ static u64 numa_get_avg_runtime(struct task_struct *p, u64 *period)
> *period = now - p->last_task_numa_placement;
> } else {
> delta = p->se.avg.runnable_avg_sum;
> - *period = p->se.avg.runnable_avg_period;
> + *period = p->se.avg.avg_period;
> }
>
> p->last_sum_exec_runtime = runtime;
--
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