public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: dietmar.eggemann@arm•com (Dietmar Eggemann)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v7 3/7] sched: add utilization_avg_contrib
Date: Wed, 08 Oct 2014 18:04:17 +0100	[thread overview]
Message-ID: <54356E91.10804@arm.com> (raw)
In-Reply-To: <1412684017-16595-4-git-send-email-vincent.guittot@linaro.org>

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@google•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@linaro•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;

  reply	other threads:[~2014-10-08 17:04 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07 12:13 [PATCH v7 0/7] sched: consolidation of cpu_capacity Vincent Guittot
2014-10-07 12:13 ` [PATCH v7 1/7] sched: add per rq cpu_capacity_orig Vincent Guittot
2014-10-07 12:13 ` [PATCH v7 2/7] sched: move cfs task on a CPU with higher capacity Vincent Guittot
2014-10-09 11:23   ` Peter Zijlstra
2014-10-09 14:59     ` Vincent Guittot
2014-10-09 15:30       ` Peter Zijlstra
2014-10-10  7:46         ` Vincent Guittot
2014-10-07 12:13 ` [PATCH v7 3/7] sched: add utilization_avg_contrib Vincent Guittot
2014-10-08 17:04   ` Dietmar Eggemann [this message]
2014-10-07 12:13 ` [PATCH 4/7] sched: Track group sched_entity usage contributions Vincent Guittot
2014-10-07 20:15   ` bsegall at google.com
2014-10-08  7:16     ` Vincent Guittot
2014-10-08 11:13     ` Morten Rasmussen
2014-10-07 12:13 ` [PATCH v7 5/7] sched: get CPU's usage statistic Vincent Guittot
2014-10-09 11:36   ` Peter Zijlstra
2014-10-09 13:57     ` Vincent Guittot
2014-10-09 15:12       ` Peter Zijlstra
2014-10-10 14:38         ` Vincent Guittot
2014-10-07 12:13 ` [PATCH v7 6/7] sched: replace capacity_factor by usage Vincent Guittot
2014-10-09 12:16   ` Peter Zijlstra
2014-10-09 14:18     ` Vincent Guittot
2014-10-09 15:18       ` Peter Zijlstra
2014-10-10  7:17         ` Vincent Guittot
2014-10-10  7:18           ` Vincent Guittot
2014-11-23  1:03       ` Wanpeng Li
2014-11-24 10:16         ` Vincent Guittot
2014-10-09 14:16   ` Peter Zijlstra
2014-10-09 14:28     ` Vincent Guittot
2014-10-09 14:58   ` Peter Zijlstra
2014-10-21  7:38     ` Vincent Guittot
2014-10-07 12:13 ` [PATCH v7 7/7] sched: add SD_PREFER_SIBLING for SMT level Vincent Guittot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54356E91.10804@arm.com \
    --to=dietmar.eggemann@arm$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox