diff options
author | Paul Jackson <pj@sgi.com> | 2006-01-08 04:02:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 23:13:44 -0500 |
commit | c417f0242ebe578924a30d4e53d35b5059fed4e7 (patch) | |
tree | 3058c7c79aedb11e7013f5faca34eb07e9a761bd /include/linux/cpuset.h | |
parent | 04c19fa6f16047abff2288ddbc1f0798ede5a849 (diff) |
[PATCH] cpuset: remove test for null cpuset from alloc code path
Remove a couple of more lines of code from the cpuset hooks in the page
allocation code path.
There was a check for a NULL cpuset pointer in the routine
cpuset_update_task_memory_state() that was only needed during system boot,
after the memory subsystem was initialized, before the cpuset subsystem was
initialized, to catch a NULL task->cpuset pointer.
Add a cpuset_init_early() routine, just before the mem_init() call in
init/main.c, that sets up just enough of the init tasks cpuset structure to
render cpuset_update_task_memory_state() calls harmless.
Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/cpuset.h')
-rw-r--r-- | include/linux/cpuset.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 34081c168af5..c472f972bd6d 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | extern int number_of_cpusets; /* How many cpusets are defined in system? */ | 17 | extern int number_of_cpusets; /* How many cpusets are defined in system? */ |
18 | 18 | ||
19 | extern int cpuset_init_early(void); | ||
19 | extern int cpuset_init(void); | 20 | extern int cpuset_init(void); |
20 | extern void cpuset_init_smp(void); | 21 | extern void cpuset_init_smp(void); |
21 | extern void cpuset_fork(struct task_struct *p); | 22 | extern void cpuset_fork(struct task_struct *p); |
@@ -49,6 +50,7 @@ extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); | |||
49 | 50 | ||
50 | #else /* !CONFIG_CPUSETS */ | 51 | #else /* !CONFIG_CPUSETS */ |
51 | 52 | ||
53 | static inline int cpuset_init_early(void) { return 0; } | ||
52 | static inline int cpuset_init(void) { return 0; } | 54 | static inline int cpuset_init(void) { return 0; } |
53 | static inline void cpuset_init_smp(void) {} | 55 | static inline void cpuset_init_smp(void) {} |
54 | static inline void cpuset_fork(struct task_struct *p) {} | 56 | static inline void cpuset_fork(struct task_struct *p) {} |