aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPaul Jackson <pj@sgi.com>2006-01-08 04:01:54 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-08 23:13:43 -0500
commitcf2a473c4089aa41c26f653200673f5a4cc25047 (patch)
tree0bce21f4684a382b13e93ba5b85409cf5eab1c2c /include
parentb4b2641843db124637fa3d2cb2101982035dcc82 (diff)
[PATCH] cpuset: combine refresh_mems and update_mems
The important code paths through alloc_pages_current() and alloc_page_vma(), by which most kernel page allocations go, both called cpuset_update_current_mems_allowed(), which in turn called refresh_mems(). -Both- of these latter two routines did a tasklock, got the tasks cpuset pointer, and checked for out of date cpuset->mems_generation. That was a silly duplication of code and waste of CPU cycles on an important code path. Consolidated those two routines into a single routine, called cpuset_update_task_memory_state(), since it updates more than just mems_allowed. Changed all callers of either routine to call the new consolidated routine. 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')
-rw-r--r--include/linux/cpuset.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index 736d73801cb6..1feebf16ab08 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -20,7 +20,7 @@ extern void cpuset_fork(struct task_struct *p);
20extern void cpuset_exit(struct task_struct *p); 20extern void cpuset_exit(struct task_struct *p);
21extern cpumask_t cpuset_cpus_allowed(const struct task_struct *p); 21extern cpumask_t cpuset_cpus_allowed(const struct task_struct *p);
22void cpuset_init_current_mems_allowed(void); 22void cpuset_init_current_mems_allowed(void);
23void cpuset_update_current_mems_allowed(void); 23void cpuset_update_task_memory_state(void);
24#define cpuset_nodes_subset_current_mems_allowed(nodes) \ 24#define cpuset_nodes_subset_current_mems_allowed(nodes) \
25 nodes_subset((nodes), current->mems_allowed) 25 nodes_subset((nodes), current->mems_allowed)
26int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl); 26int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl);
@@ -51,7 +51,7 @@ static inline cpumask_t cpuset_cpus_allowed(struct task_struct *p)
51} 51}
52 52
53static inline void cpuset_init_current_mems_allowed(void) {} 53static inline void cpuset_init_current_mems_allowed(void) {}
54static inline void cpuset_update_current_mems_allowed(void) {} 54static inline void cpuset_update_task_memory_state(void) {}
55#define cpuset_nodes_subset_current_mems_allowed(nodes) (1) 55#define cpuset_nodes_subset_current_mems_allowed(nodes) (1)
56 56
57static inline int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl) 57static inline int cpuset_zonelist_valid_mems_allowed(struct zonelist *zl)