(3/3) NUMA rebalancer
PATCH 1/1 (3/3) NUMA rebalancer
Patch from Erich Focht
This adds a hook to rebalance globally across nodes every NODE_BALANCE_RATE iterations of the rebalancer. This allows us to easily tune on an architecture specific basis how often we wish to rebalance - machines with higher NUMA ratios (more expensive off-node access) will want to do this less often. It's currently set to 100 for NUMA-Q and 10 for other machines. If the imbalance between nodes is > 125%, we'll rebalance them. The hook for this is added to the NUMA definition of cpus_to_balance, so again, no impact on non-NUMA machines.
include/asm-generic/topology.h +5 -0
@@ -48,4 +48,9 @@#define __node_to_memblk (node) (0)#endif +/* Cross-node load balancing interval. */ +#ifndef NODE_BALANCE_RATE +#define NODE_BALANCE_RATE 10 +#endif +#endif /* _ASM_GENERIC_TOPOLOGY_H */
include/asm-i386/topology.h +3 -0
@@ -61,6 +61,9 @@ static inline int __node_to_first_cpu(in/* Returns the number of the first MemBlk on Node 'node' */ #define __node_to_memblk (node) (node) +/* Cross-node load balancing interval. */ +#define NODE_BALANCE_RATE 100 +#else /* !CONFIG_NUMA */ /* * Other i386 platforms should define their own version of the
include/asm-ia64/topology.h +3 -0
@@ -60,4 +60,7 @@*/ #define __node_to_memblk (node) (node) +/* Cross-node load balancing interval. */ +#define NODE_BALANCE_RATE 10 +#endif /* _ASM_IA64_TOPOLOGY_H */
include/asm-ppc64/topology.h +3 -0
@@ -46,6 +46,9 @@ static inline unsigned long __node_to_cp return mask; } +/* Cross-node load balancing interval. */ +#define NODE_BALANCE_RATE 10 +#else /* !CONFIG_NUMA */ #define __cpu_to_node (cpu) (0)
kernel/sched.c +45 -4
78 lines not on this page · raw message