aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorPaul Jackson <pj@sgi.com>2006-01-08 04:01:55 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-08 23:13:44 -0500
commit909d75a3b77bdd8baa9429bad3b69a654d2954ce (patch)
treef9955ff697b7569fc75e5b8683d886315f34ac49 /include/linux
parentcf2a473c4089aa41c26f653200673f5a4cc25047 (diff)
[PATCH] cpuset: implement cpuset_mems_allowed
Provide a cpuset_mems_allowed() method, which the sys_migrate_pages() code needed, to obtain the mems_allowed vector of a cpuset, and replaced the workaround in sys_migrate_pages() to call this new method. Signed-off-by: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cpuset.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index 1feebf16ab08..37d2dd7ca3e9 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -18,7 +18,8 @@ extern int cpuset_init(void);
18extern void cpuset_init_smp(void); 18extern void cpuset_init_smp(void);
19extern void cpuset_fork(struct task_struct *p); 19extern void cpuset_fork(struct task_struct *p);
20extern void cpuset_exit(struct task_struct *p); 20extern void cpuset_exit(struct task_struct *p);
21extern cpumask_t cpuset_cpus_allowed(const struct task_struct *p); 21extern cpumask_t cpuset_cpus_allowed(struct task_struct *p);
22extern nodemask_t cpuset_mems_allowed(struct task_struct *p);
22void cpuset_init_current_mems_allowed(void); 23void cpuset_init_current_mems_allowed(void);
23void cpuset_update_task_memory_state(void); 24void cpuset_update_task_memory_state(void);
24#define cpuset_nodes_subset_current_mems_allowed(nodes) \ 25#define cpuset_nodes_subset_current_mems_allowed(nodes) \
@@ -50,6 +51,11 @@ static inline cpumask_t cpuset_cpus_allowed(struct task_struct *p)
50 return cpu_possible_map; 51 return cpu_possible_map;
51} 52}
52 53
54static inline nodemask_t cpuset_mems_allowed(struct task_struct *p)
55{
56 return node_possible_map;
57}
58
53static inline void cpuset_init_current_mems_allowed(void) {} 59static inline void cpuset_init_current_mems_allowed(void) {}
54static inline void cpuset_update_task_memory_state(void) {} 60static inline void cpuset_update_task_memory_state(void) {}
55#define cpuset_nodes_subset_current_mems_allowed(nodes) (1) 61#define cpuset_nodes_subset_current_mems_allowed(nodes) (1)