[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170824143339.GO491396@devbig577.frc2.facebook.com>
Date: Thu, 24 Aug 2017 07:33:39 -0700
From: Tejun Heo <tj@...nel.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Lai Jiangshan <jiangshanlai@...il.com>,
Michael Bringmann <mwb@...ux.vnet.ibm.com>
Subject: Re: [GIT PULL] workqueue fixes for v4.13-rc3
Hello,
On Thu, Aug 24, 2017 at 03:32:04PM +0200, Geert Uytterhoeven wrote:
> > Ah, okay, so it has multiple nodes but not NUMA. The generic numa
> > topology code assumes that there's only one node if !NUMA and reports
> > all online cpus regardless of the node number, which makes the same
> > CPUs to be reported for all nodes on the system. I think something
> > like the following (completely untested) should work.
>
> Thank you, that got rid of the warning.
Great, it turns out we already have cpu_none_mask. Can you please
test the following works too?
Thanks.
diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h
index fc824e2..5d2add1 100644
--- a/include/asm-generic/topology.h
+++ b/include/asm-generic/topology.h
@@ -48,7 +48,11 @@
#define parent_node(node) ((void)(node),0)
#endif
#ifndef cpumask_of_node
-#define cpumask_of_node(node) ((void)node, cpu_online_mask)
+ #ifdef CONFIG_NEED_MULTIPLE_NODES
+ #define cpumask_of_node(node) ((node) == 0 ? cpu_online_mask : cpu_none_mask)
+ #else
+ #define cpumask_of_node(node) ((void)node, cpu_online_mask)
+ #endif
#endif
#ifndef pcibus_to_node
#define pcibus_to_node(bus) ((void)(bus), -1)
Powered by blists - more mailing lists