LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Barry Song <21cnbao@gmail.com>
To: Yicong Yang <yangyicong@hisilicon.com>
Cc: mingo@redhat.com, Peter Zijlstra <peterz@infradead.org>,
	juri.lelli@redhat.com,
	Vincent Guittot <vincent.guittot@linaro.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Barry Song <song.bao.hua@hisilicon.com>,
	valentin.schneider@arm.com, prime.zeng@huawei.com,
	Linuxarm <linuxarm@huawei.com>
Subject: Re: [PATCH] sched/topology: Remove unused numa_distance in cpu_attach_domain()
Date: Sun, 22 Aug 2021 09:52:03 +1200	[thread overview]
Message-ID: <CAGsJ_4xoxPEGnyS2eQRhtci3dycmRhLL9N=dEqVWq4Zxb30kXQ@mail.gmail.com> (raw)
In-Reply-To: <20210821054111.63181-1-yangyicong@hisilicon.com>

On Sat, Aug 21, 2021 at 9:04 PM Yicong Yang <yangyicong@hisilicon.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@hisilicon.com>

looks good to me.

> ---
>  kernel/sched/topology.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> index b77ad49dc14f..ccbb141df8c8 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.17.1
>

Thanks
Barry

      reply	other threads:[~2021-08-21 21:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-21  5:41 Yicong Yang
2021-08-21 21:52 ` Barry Song [this message]

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='CAGsJ_4xoxPEGnyS2eQRhtci3dycmRhLL9N=dEqVWq4Zxb30kXQ@mail.gmail.com' \
    --to=21cnbao@gmail.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=prime.zeng@huawei.com \
    --cc=song.bao.hua@hisilicon.com \
    --cc=valentin.schneider@arm.com \
    --cc=vincent.guittot@linaro.org \
    --cc=yangyicong@hisilicon.com \
    --subject='Re: [PATCH] sched/topology: Remove unused numa_distance in cpu_attach_domain()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).