LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] sched/topology: Remove unused numa_distance in cpu_attach_domain()
@ 2021-08-21 5:41 Yicong Yang
2021-08-21 21:52 ` Barry Song
0 siblings, 1 reply; 2+ messages in thread
From: Yicong Yang @ 2021-08-21 5:41 UTC (permalink / raw)
To: mingo, peterz, juri.lelli, vincent.guittot, linux-kernel
Cc: song.bao.hua, valentin.schneider, prime.zeng, yangyicong,
linuxarm, 21cnbao
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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sched/topology: Remove unused numa_distance in cpu_attach_domain()
2021-08-21 5:41 [PATCH] sched/topology: Remove unused numa_distance in cpu_attach_domain() Yicong Yang
@ 2021-08-21 21:52 ` Barry Song
0 siblings, 0 replies; 2+ messages in thread
From: Barry Song @ 2021-08-21 21:52 UTC (permalink / raw)
To: Yicong Yang
Cc: mingo, Peter Zijlstra, juri.lelli, Vincent Guittot, LKML,
Barry Song, valentin.schneider, prime.zeng, Linuxarm
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-21 21:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-21 5:41 [PATCH] sched/topology: Remove unused numa_distance in cpu_attach_domain() Yicong Yang
2021-08-21 21:52 ` Barry Song
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).