linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] s390: set NODES_SHIFT=0 when NUMA=n
@ 2020-06-10  1:45 Qian Cai
  2020-06-10  8:45 ` Heiko Carstens
  0 siblings, 1 reply; 3+ messages in thread
From: Qian Cai @ 2020-06-10  1:45 UTC (permalink / raw)
  To: heiko.carstens, gor, borntraeger; +Cc: linux-s390, linux-kernel, 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.

Fixes: 701dc81e7412 ("s390/mm: remove fake numa support")
Signed-off-by: Qian Cai <cai@lca.pw>
---
 arch/s390/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index f854faff38c3..59625356d18a 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -462,7 +462,8 @@ config NUMA
 
 config NODES_SHIFT
 	int
-	default "1"
+	default "1" if NUMA
+	default "0"
 
 config SCHED_SMT
 	def_bool n
-- 
2.21.0 (Apple Git-122.2)


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

* Re: [PATCH] s390: set NODES_SHIFT=0 when NUMA=n
  2020-06-10  1:45 [PATCH] s390: set NODES_SHIFT=0 when NUMA=n Qian Cai
@ 2020-06-10  8:45 ` Heiko Carstens
  2020-06-10 12:07   ` Qian Cai
  0 siblings, 1 reply; 3+ messages in thread
From: Heiko Carstens @ 2020-06-10  8:45 UTC (permalink / raw)
  To: Qian Cai; +Cc: gor, borntraeger, linux-s390, linux-kernel

On Tue, Jun 09, 2020 at 09:45:01PM -0400, Qian Cai wrote:
> 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")
> Signed-off-by: Qian Cai <cai@lca.pw>
> ---
>  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 <heiko.carstens@de.ibm.com>
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")
Reported-by: Qian Cai <cai@lca.pw>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 arch/s390/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 2167bce993ff..ae01be202204 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -462,6 +462,7 @@ config NUMA
 
 config NODES_SHIFT
 	int
+	depends on NEED_MULTIPLE_NODES
 	default "1"
 
 config SCHED_SMT
-- 
2.17.1


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

* Re: [PATCH] s390: set NODES_SHIFT=0 when NUMA=n
  2020-06-10  8:45 ` Heiko Carstens
@ 2020-06-10 12:07   ` Qian Cai
  0 siblings, 0 replies; 3+ messages in thread
From: Qian Cai @ 2020-06-10 12:07 UTC (permalink / raw)
  To: Heiko Carstens; +Cc: gor, borntraeger, linux-s390, linux-kernel

On Wed, Jun 10, 2020 at 10:45:53AM +0200, Heiko Carstens wrote:
> On Tue, Jun 09, 2020 at 09:45:01PM -0400, Qian Cai wrote:
> > 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")
> > Signed-off-by: Qian Cai <cai@lca.pw>
> > ---
> >  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.

> 
> From dd3f1f08f2317768b35b2df3ff8285185df7e195 Mon Sep 17 00:00:00 2001
> From: Heiko Carstens <heiko.carstens@de.ibm.com>
> 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")
> Reported-by: Qian Cai <cai@lca.pw>
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> ---
>  arch/s390/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
> index 2167bce993ff..ae01be202204 100644
> --- a/arch/s390/Kconfig
> +++ b/arch/s390/Kconfig
> @@ -462,6 +462,7 @@ config NUMA
>  
>  config NODES_SHIFT
>  	int
> +	depends on NEED_MULTIPLE_NODES
>  	default "1"
>  
>  config SCHED_SMT
> -- 
> 2.17.1
> 

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

end of thread, other threads:[~2020-06-10 12:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10  1:45 [PATCH] s390: set NODES_SHIFT=0 when NUMA=n Qian Cai
2020-06-10  8:45 ` Heiko Carstens
2020-06-10 12:07   ` Qian Cai

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).