aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/topology.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/topology.h')
-rw-r--r--arch/powerpc/include/asm/topology.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h
index 8eaec310a25b..32adf7280720 100644
--- a/arch/powerpc/include/asm/topology.h
+++ b/arch/powerpc/include/asm/topology.h
@@ -8,6 +8,26 @@ struct device_node;
8 8
9#ifdef CONFIG_NUMA 9#ifdef CONFIG_NUMA
10 10
11/*
12 * Before going off node we want the VM to try and reclaim from the local
13 * node. It does this if the remote distance is larger than RECLAIM_DISTANCE.
14 * With the default REMOTE_DISTANCE of 20 and the default RECLAIM_DISTANCE of
15 * 20, we never reclaim and go off node straight away.
16 *
17 * To fix this we choose a smaller value of RECLAIM_DISTANCE.
18 */
19#define RECLAIM_DISTANCE 10
20
21/*
22 * Before going off node we want the VM to try and reclaim from the local
23 * node. It does this if the remote distance is larger than RECLAIM_DISTANCE.
24 * With the default REMOTE_DISTANCE of 20 and the default RECLAIM_DISTANCE of
25 * 20, we never reclaim and go off node straight away.
26 *
27 * To fix this we choose a smaller value of RECLAIM_DISTANCE.
28 */
29#define RECLAIM_DISTANCE 10
30
11#include <asm/mmzone.h> 31#include <asm/mmzone.h>
12 32
13static inline int cpu_to_node(int cpu) 33static inline int cpu_to_node(int cpu)
@@ -19,7 +39,7 @@ static inline int cpu_to_node(int cpu)
19 39
20#define cpumask_of_node(node) ((node) == -1 ? \ 40#define cpumask_of_node(node) ((node) == -1 ? \
21 cpu_all_mask : \ 41 cpu_all_mask : \
22 &numa_cpumask_lookup_table[node]) 42 node_to_cpumask_map[node])
23 43
24int of_node_to_nid(struct device_node *device); 44int of_node_to_nid(struct device_node *device);
25 45
@@ -102,8 +122,8 @@ static inline void sysfs_remove_device_from_node(struct sys_device *dev,
102#ifdef CONFIG_PPC64 122#ifdef CONFIG_PPC64
103#include <asm/smp.h> 123#include <asm/smp.h>
104 124
105#define topology_thread_cpumask(cpu) (&per_cpu(cpu_sibling_map, cpu)) 125#define topology_thread_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu))
106#define topology_core_cpumask(cpu) (&per_cpu(cpu_core_map, cpu)) 126#define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu))
107#define topology_core_id(cpu) (cpu_to_core_id(cpu)) 127#define topology_core_id(cpu) (cpu_to_core_id(cpu))
108#endif 128#endif
109#endif 129#endif