aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpuset.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/cpuset.h')
-rw-r--r--include/linux/cpuset.h33
1 files changed, 27 insertions, 6 deletions
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index 2e0d79678deb..05ea1dd7d681 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -12,6 +12,7 @@
12#include <linux/cpumask.h> 12#include <linux/cpumask.h>
13#include <linux/nodemask.h> 13#include <linux/nodemask.h>
14#include <linux/cgroup.h> 14#include <linux/cgroup.h>
15#include <linux/mm.h>
15 16
16#ifdef CONFIG_CPUSETS 17#ifdef CONFIG_CPUSETS
17 18
@@ -29,19 +30,29 @@ void cpuset_init_current_mems_allowed(void);
29void cpuset_update_task_memory_state(void); 30void cpuset_update_task_memory_state(void);
30int cpuset_nodemask_valid_mems_allowed(nodemask_t *nodemask); 31int cpuset_nodemask_valid_mems_allowed(nodemask_t *nodemask);
31 32
32extern int __cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask); 33extern int __cpuset_node_allowed_softwall(int node, gfp_t gfp_mask);
33extern int __cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask); 34extern int __cpuset_node_allowed_hardwall(int node, gfp_t gfp_mask);
34 35
35static int inline cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask) 36static inline int cpuset_node_allowed_softwall(int node, gfp_t gfp_mask)
36{ 37{
37 return number_of_cpusets <= 1 || 38 return number_of_cpusets <= 1 ||
38 __cpuset_zone_allowed_softwall(z, gfp_mask); 39 __cpuset_node_allowed_softwall(node, gfp_mask);
39} 40}
40 41
41static int inline cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask) 42static inline int cpuset_node_allowed_hardwall(int node, gfp_t gfp_mask)
42{ 43{
43 return number_of_cpusets <= 1 || 44 return number_of_cpusets <= 1 ||
44 __cpuset_zone_allowed_hardwall(z, gfp_mask); 45 __cpuset_node_allowed_hardwall(node, gfp_mask);
46}
47
48static inline int cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask)
49{
50 return cpuset_node_allowed_softwall(zone_to_nid(z), gfp_mask);
51}
52
53static inline int cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask)
54{
55 return cpuset_node_allowed_hardwall(zone_to_nid(z), gfp_mask);
45} 56}
46 57
47extern int cpuset_mems_allowed_intersects(const struct task_struct *tsk1, 58extern int cpuset_mems_allowed_intersects(const struct task_struct *tsk1,
@@ -112,6 +123,16 @@ static inline int cpuset_nodemask_valid_mems_allowed(nodemask_t *nodemask)
112 return 1; 123 return 1;
113} 124}
114 125
126static inline int cpuset_node_allowed_softwall(int node, gfp_t gfp_mask)
127{
128 return 1;
129}
130
131static inline int cpuset_node_allowed_hardwall(int node, gfp_t gfp_mask)
132{
133 return 1;
134}
135
115static inline int cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask) 136static inline int cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask)
116{ 137{
117 return 1; 138 return 1;