lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9ffc6acc-e0a5-ac01-8c5d-4d71a721fa7f@arm.com>
Date:   Mon, 2 Oct 2017 18:46:32 +0100
From:   Dietmar Eggemann <dietmar.eggemann@....com>
To:     Peter Zijlstra <peterz@...radead.org>, mingo@...nel.org,
        linux-kernel@...r.kernel.org, tj@...nel.org, josef@...icpanda.com
Cc:     torvalds@...ux-foundation.org, vincent.guittot@...aro.org,
        efault@....de, pjt@...gle.com, clm@...com,
        morten.rasmussen@....com, bsegall@...gle.com, yuyang.du@...el.com
Subject: Re: [PATCH -v2 13/18] sched/fair: Propagate an effective
 runnable_load_avg

On 01/09/17 14:21, Peter Zijlstra wrote:
> The load balancer uses runnable_load_avg as load indicator. For
> !cgroup this is:
> 
>   runnable_load_avg = \Sum se->avg.load_avg ; where se->on_rq
> 
> That is, a direct sum of all runnable tasks on that runqueue. As
> opposed to load_avg, which is a sum of all tasks on the runqueue,
> which includes a blocked component.
> 
> However, in the cgroup case, this comes apart since the group entities
> are always runnable, even if most of their constituent entities are
> blocked.
> 
> Therefore introduce a runnable_weight which for task entities is the
> same as the regular weight, but for group entities is a fraction of
> the entity weight and represents the runnable part of the group
> runqueue.
> 
> Then propagate this load through the PELT hierarchy to arrive at an
> effective runnable load avgerage -- which we should not confuse with
> the canonical runnable load average.
> 
> Suggested-by: Tejun Heo <tj@...nel.org>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
>  include/linux/sched.h |    3 
>  kernel/sched/debug.c  |    8 ++
>  kernel/sched/fair.c   |  173 ++++++++++++++++++++++++++++++++------------------
>  kernel/sched/sched.h  |    3 
>  4 files changed, 125 insertions(+), 62 deletions(-)

[...]

> @@ -2931,31 +2949,45 @@ static long calc_cfs_shares(struct cfs_r
>  
>  static inline int throttled_hierarchy(struct cfs_rq *cfs_rq);
>  
> -static void update_cfs_shares(struct sched_entity *se)
> +/*
> + * Recomputes the group entity based on the current state of its group
> + * runqueue.
> + */
> +static void update_cfs_group(struct sched_entity *se)

update_cfs_share(s)() is still mentioned in the function header of
update_tg_load_avg() and update_cfs_rq_load_avg().

Should we rename those comments with this patch?

IMHO, the comment for update_tg_load_avg() is still true whereas the one
for update_cfs_rq_load_avg() mentions cfs_rq->avg as
cfs_rq->avg.load_avg (or cfs_rq_load_avg()) and update_cfs_group()
doesn't use it anymore. It's now used in calc_group_runnable() and
calc_group_shares() instead.

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ