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: <CAKfTPtBsKc7v5gc=XUrzO-_4kahGfdNteo=t9W5fLv0Ee8co_w@mail.gmail.com>
Date:   Wed, 28 Nov 2018 14:33:17 +0100
From:   Vincent Guittot <vincent.guittot@...aro.org>
To:     Patrick Bellasi <patrick.bellasi@....com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Morten Rasmussen <Morten.Rasmussen@....com>,
        Paul Turner <pjt@...gle.com>, Ben Segall <bsegall@...gle.com>,
        Thara Gopinath <thara.gopinath@...aro.org>,
        pkondeti@...eaurora.org, Quentin Perret <quentin.perret@....com>,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Subject: Re: [PATCH v7 2/2] sched/fair: update scale invariance of PELT

On Wed, 28 Nov 2018 at 12:53, Patrick Bellasi <patrick.bellasi@....com> wrote:
>
> On 28-Nov 11:02, Peter Zijlstra wrote:
> > On Wed, Nov 28, 2018 at 10:54:13AM +0100, Vincent Guittot wrote:
> >
> > > Is there anything else that I should do for these patches ?
> >
> > IIRC, Morten mention they break util_est; Patrick was going to explain.
>
> I guess the problem is that, once we cross the current capacity,
> strictly speaking util_avg does not represent anymore a utilization.
>
> With the new signal this could happen and we end up storing estimated
> utilization samples which will overestimate the task requirements.
>
> We will have a spike in estimated utilization at next wakeup, since we
> use MAX(util_avg@...ueue_time, ewma). Potentially we also inflate the EWMA in
> case we collect multiple samples above the current capacity.

TBH I don't see how it's different from current implementation with a
task that was scheduled on big core and now wakes up on little core.
The util_est is overestimated as well.

But I'm fine with adding your proposal on to on the patchset

>
> So, a possible fix could be to avoid storing util_est samples if we
> end up with a utilization above the current capacity.
>
> Something like:
>
> ----8<---
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index ac855b2f4774..93e0cf5d8a76 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -3661,6 +3661,10 @@ util_est_dequeue(struct cfs_rq *cfs_rq, struct task_struct *p, bool task_sleep)
>         if (!task_sleep)
>                 return;
>
> +       /* Skip samples which do not represent an actual utilization */
> +       if (unlikely(task_util(p) > capacity_of(task_cpu(p))))
> +               return;
> +
>         /*
>          * If the PELT values haven't changed since enqueue time,
>          * skip the util_est update.
> ---8<---
>
> Could that work ?
>
> Maybe using a new utility function to wrap the new check.
>
> --
> #include <best/regards.h>
>
> Patrick Bellasi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ