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: <CAKfTPtDqcQPdSzLRzteF6F6Q9G6qO43LrMKRJTQBrMkfQMCamg@mail.gmail.com>
Date:   Tue, 27 Apr 2021 09:08:44 +0200
From:   Vincent Guittot <vincent.guittot@...aro.org>
To:     "Gautham R. Shenoy" <ego@...ux.vnet.ibm.com>
Cc:     Mel Gorman <mgorman@...hsingularity.net>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>,
        Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sched/fair: Fix unsetting of "has_idle_cores" flag

On Mon, 26 Apr 2021 at 19:04, Gautham R. Shenoy <ego@...ux.vnet.ibm.com> wrote:
>
> From: "Gautham R. Shenoy" <ego@...ux.vnet.ibm.com>
>
> In commit 9fe1f127b913 ("sched/fair: Merge select_idle_core/cpu()"), in
> select_idle_cpu(), we check if an idle core is present in the LLC of the
> target CPU via the flag "has_idle_cores". We look for the idle core in
> select_idle_cores(). If select_idle_cores() isn't able to find an idle
> core/CPU, we need to unset the has_idle_cores flag in the LLC of the
> target to prevent other CPUs from going down this route.
>
> However, the current code is unsetting it in the LLC of the current CPU
> instead of the target CPU. This patch fixes this issue.
>
> Fixes: Commit 9fe1f127b913 ("sched/fair: Merge select_idle_core/cpu()")
> Cc: Mel Gorman <mgorman@...hsingularity.net>
> Signed-off-by: Gautham R. Shenoy <ego@...ux.vnet.ibm.com>

Reviewed-by: Vincent Guittot <vincent.guittot@...aro.org>

> ---
>  kernel/sched/fair.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 794c2cb..5fb5020 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -6171,7 +6171,7 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int t
>         }
>
>         if (smt)
> -               set_idle_cores(this, false);
> +               set_idle_cores(target, false);
>
>         if (sched_feat(SIS_PROP) && !smt) {
>                 time = cpu_clock(this) - time;
> --
> 1.9.4
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ