diff options
author | David Rientjes <rientjes@google.com> | 2009-04-02 19:57:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-02 22:04:57 -0400 |
commit | a1bc5a4eee990a1f290735c8694d0aebdad095fa (patch) | |
tree | f3e5849823444136df9c7f91f7217e1894235682 /include/linux | |
parent | 7f81b1ae18416b457e4d5ff23f0bd598e8a42224 (diff) |
cpusets: replace zone allowed functions with node allowed
The cpuset_zone_allowed() variants are actually only a function of the
zone's node.
Cc: Paul Menage <menage@google.com>
Acked-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/cpuset.h | 33 |
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); | |||
29 | void cpuset_update_task_memory_state(void); | 30 | void cpuset_update_task_memory_state(void); |
30 | int cpuset_nodemask_valid_mems_allowed(nodemask_t *nodemask); | 31 | int cpuset_nodemask_valid_mems_allowed(nodemask_t *nodemask); |
31 | 32 | ||
32 | extern int __cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask); | 33 | extern int __cpuset_node_allowed_softwall(int node, gfp_t gfp_mask); |
33 | extern int __cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask); | 34 | extern int __cpuset_node_allowed_hardwall(int node, gfp_t gfp_mask); |
34 | 35 | ||
35 | static int inline cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask) | 36 | static 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 | ||
41 | static int inline cpuset_zone_allowed_hardwall(struct zone *z, gfp_t gfp_mask) | 42 | static 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 | |||
48 | static 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 | |||
53 | static 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 | ||
47 | extern int cpuset_mems_allowed_intersects(const struct task_struct *tsk1, | 58 | extern 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 | ||
126 | static inline int cpuset_node_allowed_softwall(int node, gfp_t gfp_mask) | ||
127 | { | ||
128 | return 1; | ||
129 | } | ||
130 | |||
131 | static inline int cpuset_node_allowed_hardwall(int node, gfp_t gfp_mask) | ||
132 | { | ||
133 | return 1; | ||
134 | } | ||
135 | |||
115 | static inline int cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask) | 136 | static inline int cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask) |
116 | { | 137 | { |
117 | return 1; | 138 | return 1; |