memory zonelist caching 2.6.18 backport
Subsystems (6)
PATCH 1/1 memory zonelist caching 2.6.18 backport
Rohit - here's a backport to 2.6.18 of my zonelist caching patches. This patch combines the following four patches:
memory_page_alloc_minor_cleanups
memory_page_alloc_empty_zonelist
memory_fast_zonelist_scan
memory_fast_zonelist_cache_counter_expiration
These patches are actually slightly ahead of what I've sent to linux-mm for general consideration. They rework the check for an empty zonelist in __alloc_pages, and they add a counter along side the timer based expiration triggers on resetting the zonelist cache.
This patch is intended only for use in your testing.
I'll be sending the real patches for general consideration, against 2.6.18-mm*, in separate messages.
---
include/linux/cpuset.h | 2 include/linux/mmzone.h | 91 ++++++++++++++++++- mm/mempolicy.c | 2 mm/page_alloc.c | 224 ++++++++++++++++++++++++++++++++++++++++++++----- 4 files changed, 295 insertions(+), 24 deletions(-)
include/linux/cpuset.h +2 -0
@@ -23,6 +23,7 @@ extern void cpuset_fork(struct task_struextern void cpuset_exit (struct task_struct *p);extern cpumask_t cpuset_cpus_allowed (struct task_struct *p);extern nodemask_t cpuset_mems_allowed (struct task_struct *p); +#define cpuset_current_mems_allowed (current->mems_allowed)void cpuset_init_current_mems_allowed (void );void cpuset_update_task_memory_state (void );#define cpuset_nodes_subset_current_mems_allowed (nodes) \
@@ -81,6 +82,7 @@ static inline nodemask_t cpuset_mems_allreturn node_possible_map; } +#define cpuset_current_mems_allowed (node_online_map)static inline void cpuset_init_current_mems_allowed (void ) {}static inline void cpuset_update_task_memory_state (void ) {}#define cpuset_nodes_subset_current_mems_allowed (nodes) (1)
include/linux/mmzone.h +86 -5
105 lines not on this page · raw message
mm/mempolicy.c +2 -0
@@ -140,9 +140,11 @@ static struct zonelist *bind_zonelist(noint num, max, nd, k; max =1 +MAX_NR_ZONES *nodes_weight (*nodes); + max++;/* space for zlcache_ptr (see mmzone.h) */ zl =kmalloc (sizeof (struct zone *) * max,GFP_KERNEL );if (!zl)return NULL ; + zl->zlcache_ptr =NULL ; num =0 ;/* First put in the highest zones from all nodes, then all the next lower zones etc. Avoid empty zones because the memory allocator
mm/page_alloc.c +205 -19
295 lines not on this page · raw message
Signature · 9 lines
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.650.933.1373
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>