diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/cgroup_subsys.h | 6 | ||||
-rw-r--r-- | include/linux/cpuset.h | 12 | ||||
-rw-r--r-- | include/linux/mempolicy.h | 12 | ||||
-rw-r--r-- | include/linux/sched.h | 3 |
4 files changed, 14 insertions, 19 deletions
diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h index f8eddbbcad9a..b152b51a4367 100644 --- a/include/linux/cgroup_subsys.h +++ b/include/linux/cgroup_subsys.h | |||
@@ -7,4 +7,10 @@ | |||
7 | 7 | ||
8 | /* */ | 8 | /* */ |
9 | 9 | ||
10 | #ifdef CONFIG_CPUSETS | ||
11 | SUBSYS(cpuset) | ||
12 | #endif | ||
13 | |||
14 | /* */ | ||
15 | |||
10 | /* */ | 16 | /* */ |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index ea44d2e768a0..31adfde1c95f 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
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 | 15 | ||
15 | #ifdef CONFIG_CPUSETS | 16 | #ifdef CONFIG_CPUSETS |
16 | 17 | ||
@@ -19,8 +20,6 @@ extern int number_of_cpusets; /* How many cpusets are defined in system? */ | |||
19 | extern int cpuset_init_early(void); | 20 | extern int cpuset_init_early(void); |
20 | extern int cpuset_init(void); | 21 | extern int cpuset_init(void); |
21 | extern void cpuset_init_smp(void); | 22 | extern void cpuset_init_smp(void); |
22 | extern void cpuset_fork(struct task_struct *p); | ||
23 | extern void cpuset_exit(struct task_struct *p); | ||
24 | extern cpumask_t cpuset_cpus_allowed(struct task_struct *p); | 23 | extern cpumask_t cpuset_cpus_allowed(struct task_struct *p); |
25 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); | 24 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); |
26 | #define cpuset_current_mems_allowed (current->mems_allowed) | 25 | #define cpuset_current_mems_allowed (current->mems_allowed) |
@@ -76,13 +75,13 @@ static inline int cpuset_do_slab_mem_spread(void) | |||
76 | 75 | ||
77 | extern void cpuset_track_online_nodes(void); | 76 | extern void cpuset_track_online_nodes(void); |
78 | 77 | ||
78 | extern int current_cpuset_is_being_rebound(void); | ||
79 | |||
79 | #else /* !CONFIG_CPUSETS */ | 80 | #else /* !CONFIG_CPUSETS */ |
80 | 81 | ||
81 | static inline int cpuset_init_early(void) { return 0; } | 82 | static inline int cpuset_init_early(void) { return 0; } |
82 | static inline int cpuset_init(void) { return 0; } | 83 | static inline int cpuset_init(void) { return 0; } |
83 | static inline void cpuset_init_smp(void) {} | 84 | static inline void cpuset_init_smp(void) {} |
84 | static inline void cpuset_fork(struct task_struct *p) {} | ||
85 | static inline void cpuset_exit(struct task_struct *p) {} | ||
86 | 85 | ||
87 | static inline cpumask_t cpuset_cpus_allowed(struct task_struct *p) | 86 | static inline cpumask_t cpuset_cpus_allowed(struct task_struct *p) |
88 | { | 87 | { |
@@ -148,6 +147,11 @@ static inline int cpuset_do_slab_mem_spread(void) | |||
148 | 147 | ||
149 | static inline void cpuset_track_online_nodes(void) {} | 148 | static inline void cpuset_track_online_nodes(void) {} |
150 | 149 | ||
150 | static inline int current_cpuset_is_being_rebound(void) | ||
151 | { | ||
152 | return 0; | ||
153 | } | ||
154 | |||
151 | #endif /* !CONFIG_CPUSETS */ | 155 | #endif /* !CONFIG_CPUSETS */ |
152 | 156 | ||
153 | #endif /* _LINUX_CPUSET_H */ | 157 | #endif /* _LINUX_CPUSET_H */ |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 38c04d61ee06..59c4865bc85f 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
@@ -148,14 +148,6 @@ extern void mpol_rebind_task(struct task_struct *tsk, | |||
148 | const nodemask_t *new); | 148 | const nodemask_t *new); |
149 | extern void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new); | 149 | extern void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new); |
150 | extern void mpol_fix_fork_child_flag(struct task_struct *p); | 150 | extern void mpol_fix_fork_child_flag(struct task_struct *p); |
151 | #define set_cpuset_being_rebound(x) (cpuset_being_rebound = (x)) | ||
152 | |||
153 | #ifdef CONFIG_CPUSETS | ||
154 | #define current_cpuset_is_being_rebound() \ | ||
155 | (cpuset_being_rebound == current->cpuset) | ||
156 | #else | ||
157 | #define current_cpuset_is_being_rebound() 0 | ||
158 | #endif | ||
159 | 151 | ||
160 | extern struct mempolicy default_policy; | 152 | extern struct mempolicy default_policy; |
161 | extern struct zonelist *huge_zonelist(struct vm_area_struct *vma, | 153 | extern struct zonelist *huge_zonelist(struct vm_area_struct *vma, |
@@ -173,8 +165,6 @@ static inline void check_highest_zone(enum zone_type k) | |||
173 | int do_migrate_pages(struct mm_struct *mm, | 165 | int do_migrate_pages(struct mm_struct *mm, |
174 | const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags); | 166 | const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags); |
175 | 167 | ||
176 | extern void *cpuset_being_rebound; /* Trigger mpol_copy vma rebind */ | ||
177 | |||
178 | #else | 168 | #else |
179 | 169 | ||
180 | struct mempolicy {}; | 170 | struct mempolicy {}; |
@@ -248,8 +238,6 @@ static inline void mpol_fix_fork_child_flag(struct task_struct *p) | |||
248 | { | 238 | { |
249 | } | 239 | } |
250 | 240 | ||
251 | #define set_cpuset_being_rebound(x) do {} while (0) | ||
252 | |||
253 | static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma, | 241 | static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma, |
254 | unsigned long addr, gfp_t gfp_flags, struct mempolicy **mpol) | 242 | unsigned long addr, gfp_t gfp_flags, struct mempolicy **mpol) |
255 | { | 243 | { |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 1aa1cfa63b37..93a55f2e5ef6 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -756,8 +756,6 @@ static inline int above_background_load(void) | |||
756 | } | 756 | } |
757 | 757 | ||
758 | struct io_context; /* See blkdev.h */ | 758 | struct io_context; /* See blkdev.h */ |
759 | struct cpuset; | ||
760 | |||
761 | #define NGROUPS_SMALL 32 | 759 | #define NGROUPS_SMALL 32 |
762 | #define NGROUPS_PER_BLOCK ((int)(PAGE_SIZE / sizeof(gid_t))) | 760 | #define NGROUPS_PER_BLOCK ((int)(PAGE_SIZE / sizeof(gid_t))) |
763 | struct group_info { | 761 | struct group_info { |
@@ -1125,7 +1123,6 @@ struct task_struct { | |||
1125 | short il_next; | 1123 | short il_next; |
1126 | #endif | 1124 | #endif |
1127 | #ifdef CONFIG_CPUSETS | 1125 | #ifdef CONFIG_CPUSETS |
1128 | struct cpuset *cpuset; | ||
1129 | nodemask_t mems_allowed; | 1126 | nodemask_t mems_allowed; |
1130 | int cpuset_mems_generation; | 1127 | int cpuset_mems_generation; |
1131 | int cpuset_mem_spread_rotor; | 1128 | int cpuset_mem_spread_rotor; |