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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 16 Sep 2021 21:42:21 +1200
From:   Barry Song <21cnbao@...il.com>
To:     Yicong Yang <yangyicong@...ilicon.com>
Cc:     mingo@...hat.com, Peter Zijlstra <peterz@...radead.org>,
        juri.lelli@...hat.com,
        Vincent Guittot <vincent.guittot@...aro.org>,
        valentin.schneider@....com, LKML <linux-kernel@...r.kernel.org>,
        Barry Song <song.bao.hua@...ilicon.com>, prime.zeng@...wei.com
Subject: Re: [RESEND PATCH] sched/topology: Remove unused numa_distance in cpu_attach_domain()

On Wed, Sep 15, 2021 at 9:55 PM Yicong Yang <yangyicong@...ilicon.com> wrote:
>
> numa_distance in cpu_attach_domain() is introduced in
> commit b5b217346de8 ("sched/topology: Warn when NUMA diameter > 2")
> to warn user when NUMA diameter > 2 as we'll misrepresent
> the scheduler topology structures at that time. This is
> fixed by Barry in commit 585b6d2723dc ("sched/topology: fix the issue
> groups don't span domain->span for NUMA diameter > 2") and
> numa_distance is unused now. So remove it.
>
> Signed-off-by: Yicong Yang <yangyicong@...ilicon.com>

I have double checked this patch and it is quite right.

When I removed the code of WARN_ON(numa_distance > 2), I forgot
to delete the numa_distance which became redundant.

Reviewed-by: Barry Song <baohua@...nel.org>

> ---
>  kernel/sched/topology.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> index 4e8698e62f07..690bd1ab86f3 100644
> --- a/kernel/sched/topology.c
> +++ b/kernel/sched/topology.c
> @@ -688,7 +688,6 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu)
>  {
>         struct rq *rq = cpu_rq(cpu);
>         struct sched_domain *tmp;
> -       int numa_distance = 0;
>
>         /* Remove the sched domains which do not contribute to scheduling. */
>         for (tmp = sd; tmp; ) {
> @@ -720,9 +719,6 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu)
>                         sd->child = NULL;
>         }
>
> -       for (tmp = sd; tmp; tmp = tmp->parent)
> -               numa_distance += !!(tmp->flags & SD_NUMA);
> -
>         sched_domain_debug(sd, cpu);
>
>         rq_attach_root(rq, rd);
> --
> 2.33.0
>

Thanks
barry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ