aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpuset.h
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2009-04-02 19:57:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-02 22:04:57 -0400
commita1bc5a4eee990a1f290735c8694d0aebdad095fa (patch)
treef3e5849823444136df9c7f91f7217e1894235682 /include/linux/cpuset.h
parent7f81b1ae18416b457e4d5ff23f0bd598e8a42224 (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/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;