fake numa node speedup - fix for non-CPUSET builds
Subsystems (3)
RFC 1/1 fake numa node speedup - fix for non-CPUSET builds
My RFC patch memory_fast_zonelist_scan does not compile in the case of NUMA enabled, CPUSET disabled, because it tries to access "current->mems_allowed" from NUMA code.
Fix by adding yet another cpuset.h macro to access the current tasks mems_allowed (or node_online_map for non-CPUSET configs.)
Signed-off-by Paul Jackson
---
include/linux/cpuset.h | 2 ++ mm/page_alloc.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
mm/page_alloc.c +1 -1
@@ -956,7 +956,7 @@ static int zlf_setup(struct zonelist *zoreturn 0 ; allowednodes = !in_interrupt () && (alloc_flags &ALLOC_CPUSET ) ? - ¤t->mems_allowed : &node_online_map; + &cpuset_current_mems_allowed : &node_online_map;if (jiffies - zlf->last_full_zap >1 *HZ ) {nodes_clear (zlf->fullnodes);
include/linux/cpuset.h +2 -0
@@ -23,6 +23,7 @@ extern void cpuset_fork(struct task_struextern void cpuset_exit (struct task_struct *p);extern cpumask_t cpuset_cpus_allowed (struct task_struct *p);extern nodemask_t cpuset_mems_allowed (struct task_struct *p); +#define cpuset_current_mems_allowed (current->mems_allowed)void cpuset_init_current_mems_allowed (void );void cpuset_update_task_memory_state (void );#define cpuset_nodes_subset_current_mems_allowed (nodes) \
@@ -83,6 +84,7 @@ static inline nodemask_t cpuset_mems_allreturn node_possible_map; } +#define cpuset_current_mems_allowed (node_online_map)static inline void cpuset_init_current_mems_allowed (void ) {}static inline void cpuset_update_task_memory_state (void ) {}#define cpuset_nodes_subset_current_mems_allowed (nodes) (1)
Signature · 9 lines
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>