diff options
Diffstat (limited to 'include/linux/cpuset.h')
-rw-r--r-- | include/linux/cpuset.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 4d8adf663681..fd404416f31c 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -23,16 +23,26 @@ extern void cpuset_fork(struct task_struct *p); | |||
23 | extern void cpuset_exit(struct task_struct *p); | 23 | extern void cpuset_exit(struct task_struct *p); |
24 | extern cpumask_t cpuset_cpus_allowed(struct task_struct *p); | 24 | extern cpumask_t cpuset_cpus_allowed(struct task_struct *p); |
25 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); | 25 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); |
26 | #define cpuset_current_mems_allowed (current->mems_allowed) | ||
26 | void cpuset_init_current_mems_allowed(void); | 27 | void cpuset_init_current_mems_allowed(void); |
27 | void cpuset_update_task_memory_state(void); | 28 | void cpuset_update_task_memory_state(void); |
28 | #define cpuset_nodes_subset_current_mems_allowed(nodes) \ | 29 | #define cpuset_nodes_subset_current_mems_allowed(nodes) \ |
29 | nodes_subset((nodes), current->mems_allowed) | 30 | nodes_subset((nodes), current->mems_allowed) |
30 | int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl); | 31 | int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl); |
31 | 32 | ||
32 | extern int __cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask); | 33 | extern int __cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask); |
33 | static int inline cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask) | 34 | extern int __cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask); |
35 | |||
36 | static int inline cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask) | ||
37 | { | ||
38 | return number_of_cpusets <= 1 || | ||
39 | __cpuset_zone_allowed_softwall(z, gfp_mask); | ||
40 | } | ||
41 | |||
42 | static int inline cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask) | ||
34 | { | 43 | { |
35 | return number_of_cpusets <= 1 || __cpuset_zone_allowed(z, gfp_mask); | 44 | return number_of_cpusets <= 1 || |
45 | __cpuset_zone_allowed_hardwall(z, gfp_mask); | ||
36 | } | 46 | } |
37 | 47 | ||
38 | extern int cpuset_excl_nodes_overlap(const struct task_struct *p); | 48 | extern int cpuset_excl_nodes_overlap(const struct task_struct *p); |
@@ -83,6 +93,7 @@ static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) | |||
83 | return node_possible_map; | 93 | return node_possible_map; |
84 | } | 94 | } |
85 | 95 | ||
96 | #define cpuset_current_mems_allowed (node_online_map) | ||
86 | static inline void cpuset_init_current_mems_allowed(void) {} | 97 | static inline void cpuset_init_current_mems_allowed(void) {} |
87 | static inline void cpuset_update_task_memory_state(void) {} | 98 | static inline void cpuset_update_task_memory_state(void) {} |
88 | #define cpuset_nodes_subset_current_mems_allowed(nodes) (1) | 99 | #define cpuset_nodes_subset_current_mems_allowed(nodes) (1) |
@@ -92,7 +103,12 @@ static inline int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl) | |||
92 | return 1; | 103 | return 1; |
93 | } | 104 | } |
94 | 105 | ||
95 | static inline int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask) | 106 | static inline int cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask) |
107 | { | ||
108 | return 1; | ||
109 | } | ||
110 | |||
111 | static inline int cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask) | ||
96 | { | 112 | { |
97 | return 1; | 113 | return 1; |
98 | } | 114 | } |