summaryrefslogtreecommitdiffstats
path: root/arch/s390/numa/mode_emu.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2016-07-28 18:14:29 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-07-31 11:28:00 +0200
commitef4423ce70b8a78768a6e854e4d84c082800317d (patch)
treeeedd16f150f0baa440ed2e2db0841081586ed956 /arch/s390/numa/mode_emu.c
parents390/als: fix compile with gcov enabled (diff)
downloadlinux-ef4423ce70b8a78768a6e854e4d84c082800317d.tar.xz
linux-ef4423ce70b8a78768a6e854e4d84c082800317d.zip
s390/numa: only set possible nodes within node_possible_map
Make sure that only those nodes appear in the node_possible_map that may actually be used. Usually that means that the node online and possible maps are identical. For mode "plain" we only have one node, for mode "emu" we have "emu_nodes" nodes. Before this the possible map included (with default config) 16 nodes while usually only one was used. That made a couple of loops that iterated over all possible nodes do more work than necessary. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Acked-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/numa/mode_emu.c')
-rw-r--r--arch/s390/numa/mode_emu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/s390/numa/mode_emu.c b/arch/s390/numa/mode_emu.c
index fbc394e16b2c..37e0bb835516 100644
--- a/arch/s390/numa/mode_emu.c
+++ b/arch/s390/numa/mode_emu.c
@@ -482,8 +482,12 @@ static int emu_setup_nodes_adjust(int nodes)
*/
static void emu_setup(void)
{
+ int nid;
+
emu_size = emu_setup_size_adjust(emu_size);
emu_nodes = emu_setup_nodes_adjust(emu_nodes);
+ for (nid = 0; nid < emu_nodes; nid++)
+ node_set(nid, node_possible_map);
pr_info("Creating %d nodes with memory stripe size %ld MB\n",
emu_nodes, emu_size >> 20);
}