Skip to contentSkip to conversation

s390: set NODES_SHIFT=0 when NUMA=n

PATCH In review Qian Cai 2 participants 3 messages Jun 10, 2020 s390

lore
Share & tools
lore

Qian Cai

author
#0 lore raw

PATCH 1/1 s390: set NODES_SHIFT=0 when NUMA=n

When NUMA=n and nr_node_ids=2, in apply_wqattrs_prepare(), it has,

for_each_node(node) {
	if (wq_calc_node_cpumask(...

where it will trigger a booting warning,

WARNING: workqueue cpumask: online intersect > possible intersect

because it found 2 nodes and wq_numa_possible_cpumask[1] is an empty cpumask. NUMA=y has no such problem because node_possible_map will be initialized properly containing only node 0. Fix it by setting NODES_SHIFT=0 when NUMA=n.

Fixes 701dc81e7412 ("s390/mm: remove fake numa support")
---
 arch/s390/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/s390/Kconfig +2 -1
index f854faff38c3..59625356d18a 100644
@@ -462,7 +462,8 @@ config NUMA
 
 config NODES_SHIFT
 	int
-	default "1"
+	default "1" if NUMA
+	default "0"
 
 config SCHED_SMT
 	def_bool n
Signature · 1 line
2.21.0 (Apple Git-122.2)
#1 lore raw
Quoted 14 lines · Qian Cai

When NUMA=n and nr_node_ids=2, in apply_wqattrs_prepare(), it has,

for_each_node(node) {
	if (wq_calc_node_cpumask(...

where it will trigger a booting warning,

WARNING: workqueue cpumask: online intersect > possible intersect

because it found 2 nodes and wq_numa_possible_cpumask[1] is an empty cpumask. NUMA=y has no such problem because node_possible_map will be initialized properly containing only node 0. Fix it by setting NODES_SHIFT=0 when NUMA=n.

Quoted 5 lines
Fixes 701dc81e7412 ("s390/mm: remove fake numa support")
---
 arch/s390/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Thanks! However I committed a different solution. Hope you don't mind:

From dd3f1f08f2317768b35b2df3ff8285185df7e195 Mon Sep 17 00:00:00 2001
From: Heiko Carstens <[email protected]>
Date: Wed, 10 Jun 2020 10:36:05 +0200
Subject: [PATCH] s390/numa: let NODES_SHIFT depend on NEED_MULTIPLE_NODES

Qian Cai reported:
---
When NUMA=n and nr_node_ids=2, in apply_wqattrs_prepare(), it has,

for_each_node(node) {
        if (wq_calc_node_cpumask(...

where it will trigger a booting warning,

WARNING: workqueue cpumask: online intersect > possible intersect

because it found 2 nodes and wq_numa_possible_cpumask[1] is an empty cpumask.
---

Let NODES_SHIFT depend on NEED_MULTIPLE_NODES like it is done on other architectures in order to fix this.

Fixes 701dc81e7412 ("s390/mm: remove fake numa support")
---
 arch/s390/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/s390/Kconfig +1 -0
index 2167bce993ff..ae01be202204 100644
@@ -462,6 +462,7 @@ config NUMA
 
 config NODES_SHIFT
 	int
+	depends on NEED_MULTIPLE_NODES
 	default "1"
 
 config SCHED_SMT
Signature · 1 line
2.17.1
author
#2 lore raw
Quoted 15 lines · Heiko Carstens
Quoted 14 lines · Qian Cai

When NUMA=n and nr_node_ids=2, in apply_wqattrs_prepare(), it has,

for_each_node(node) {
	if (wq_calc_node_cpumask(...

where it will trigger a booting warning,

WARNING: workqueue cpumask: online intersect > possible intersect

because it found 2 nodes and wq_numa_possible_cpumask[1] is an empty cpumask. NUMA=y has no such problem because node_possible_map will be initialized properly containing only node 0. Fix it by setting NODES_SHIFT=0 when NUMA=n.

Quoted 7 lines
Quoted 5 lines
Fixes 701dc81e7412 ("s390/mm: remove fake numa support")
---
 arch/s390/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Thanks! However I committed a different solution. Hope you don't mind:

No problem with that at all.

Quoted 46 lines

From dd3f1f08f2317768b35b2df3ff8285185df7e195 Mon Sep 17 00:00:00 2001
From: Heiko Carstens <[email protected]>
Date: Wed, 10 Jun 2020 10:36:05 +0200
Subject: [PATCH] s390/numa: let NODES_SHIFT depend on NEED_MULTIPLE_NODES

Qian Cai reported:
---
When NUMA=n and nr_node_ids=2, in apply_wqattrs_prepare(), it has,

for_each_node(node) {
        if (wq_calc_node_cpumask(...

where it will trigger a booting warning,

WARNING: workqueue cpumask: online intersect > possible intersect

because it found 2 nodes and wq_numa_possible_cpumask[1] is an empty cpumask.
---

Let NODES_SHIFT depend on NEED_MULTIPLE_NODES like it is done on other architectures in order to fix this.

Fixes 701dc81e7412 ("s390/mm: remove fake numa support")
---
 arch/s390/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/s390/Kconfig +1 -0
index 2167bce993ff..ae01be202204 100644
@@ -462,6 +462,7 @@ config NUMA
 
 config NODES_SHIFT
 	int
+	depends on NEED_MULTIPLE_NODES
 	default "1"
 
 config SCHED_SMT
Signature · 1 line
2.17.1