All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86, sched: fix up typo in topology detection
@ 2014-09-30 21:45 Dave Hansen
  2014-10-03  5:27 ` [tip:sched/core] sched/x86: Fix " tip-bot for Dave Hansen
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Hansen @ 2014-09-30 21:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: Dave Hansen, dave.hansen, akpm, peterz, mingo


From: Dave Hansen <dave.hansen@linux.intel.com>

Commit cebf15eb09 (in linux-next now) added some code to try to
detect the situation where we have a NUMA node inside of the
"DIE" sched domain.  It detected this by looking for cpus which
match_die() but do not match NUMA nodes via topology_same_node().

I wrote it up as:

	if (match_die(c, o) == !topology_same_node(c, o))

which actually seemed to work some of the time, albiet
accidentally.

It should have been doing an &&, not an ==.

This code essentially chopped off the "DIE" domain on one of
Andrew Morton's systems.  He reported that this patch fixed his
issue.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
---

 b/arch/x86/kernel/smpboot.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/x86/kernel/smpboot.c~fix-up-typo arch/x86/kernel/smpboot.c
--- a/arch/x86/kernel/smpboot.c~fix-up-typo	2014-09-30 14:24:52.934235516 -0700
+++ b/arch/x86/kernel/smpboot.c	2014-09-30 14:30:42.074917876 -0700
@@ -445,7 +445,7 @@ void set_cpu_sibling_map(int cpu)
 			} else if (i != cpu && !c->booted_cores)
 				c->booted_cores = cpu_data(i).booted_cores;
 		}
-		if (match_die(c, o) == !topology_same_node(c, o))
+		if (match_die(c, o) && !topology_same_node(c, o))
 			primarily_use_numa_for_topology();
 	}
 }
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip:sched/core] sched/x86: Fix up typo in topology detection
  2014-09-30 21:45 [PATCH] x86, sched: fix up typo in topology detection Dave Hansen
@ 2014-10-03  5:27 ` tip-bot for Dave Hansen
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Dave Hansen @ 2014-10-03  5:27 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, imammedo, torvalds, peterz, jan.kiszka,
	toshi.kani, tianyu.lan, dave, akpm, tglx, dave.hansen, prarit,
	rientjes

Commit-ID:  728e5653e6fdb2a0892e94a600aef8c9a036c7eb
Gitweb:     http://git.kernel.org/tip/728e5653e6fdb2a0892e94a600aef8c9a036c7eb
Author:     Dave Hansen <dave.hansen@linux.intel.com>
AuthorDate: Tue, 30 Sep 2014 14:45:46 -0700
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 3 Oct 2014 05:46:52 +0200

sched/x86: Fix up typo in topology detection

Commit:

  cebf15eb09a2 ("x86, sched: Add new topology for multi-NUMA-node CPUs")

some code to try to detect the situation where we have a NUMA node
inside of the "DIE" sched domain.

It detected this by looking for cpus which match_die() but do not match
NUMA nodes via topology_same_node().

I wrote it up as:

	if (match_die(c, o) == !topology_same_node(c, o))

which actually seemed to work some of the time, albiet
accidentally.

It should have been doing an &&, not an ==.

This code essentially chopped off the "DIE" domain on one of
Andrew Morton's systems.  He reported that this patch fixed his
issue.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Dave Hansen <dave@sr71.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Lan Tianyu <tianyu.lan@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Toshi Kani <toshi.kani@hp.com>
Link: http://lkml.kernel.org/r/20140930214546.FD481CFF@viggo.jf.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/smpboot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 8de8eb7..bae9e09 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -445,7 +445,7 @@ void set_cpu_sibling_map(int cpu)
 			} else if (i != cpu && !c->booted_cores)
 				c->booted_cores = cpu_data(i).booted_cores;
 		}
-		if (match_die(c, o) == !topology_same_node(c, o))
+		if (match_die(c, o) && !topology_same_node(c, o))
 			primarily_use_numa_for_topology();
 	}
 }

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-03  5:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-30 21:45 [PATCH] x86, sched: fix up typo in topology detection Dave Hansen
2014-10-03  5:27 ` [tip:sched/core] sched/x86: Fix " tip-bot for Dave Hansen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.