diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-05-25 12:40:08 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-05-25 12:40:08 -0400 |
commit | c6a756795d5ba0637aae8da89dd11bb7e3a1ee74 (patch) | |
tree | 1c19f951f2604dbb6b867a6dcdf94d20c204cc5c /mm/slab.c | |
parent | 382066da251132f768380f4852ed5afb72d88f80 (diff) | |
parent | a8bd60705aa17a998516837d9c1e503ad4cbd7fc (diff) |
Merge branch 'master'
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -700,6 +700,14 @@ static enum { | |||
700 | FULL | 700 | FULL |
701 | } g_cpucache_up; | 701 | } g_cpucache_up; |
702 | 702 | ||
703 | /* | ||
704 | * used by boot code to determine if it can use slab based allocator | ||
705 | */ | ||
706 | int slab_is_available(void) | ||
707 | { | ||
708 | return g_cpucache_up == FULL; | ||
709 | } | ||
710 | |||
703 | static DEFINE_PER_CPU(struct work_struct, reap_work); | 711 | static DEFINE_PER_CPU(struct work_struct, reap_work); |
704 | 712 | ||
705 | static void free_block(struct kmem_cache *cachep, void **objpp, int len, | 713 | static void free_block(struct kmem_cache *cachep, void **objpp, int len, |
@@ -2192,11 +2200,14 @@ static void drain_cpu_caches(struct kmem_cache *cachep) | |||
2192 | check_irq_on(); | 2200 | check_irq_on(); |
2193 | for_each_online_node(node) { | 2201 | for_each_online_node(node) { |
2194 | l3 = cachep->nodelists[node]; | 2202 | l3 = cachep->nodelists[node]; |
2195 | if (l3) { | 2203 | if (l3 && l3->alien) |
2204 | drain_alien_cache(cachep, l3->alien); | ||
2205 | } | ||
2206 | |||
2207 | for_each_online_node(node) { | ||
2208 | l3 = cachep->nodelists[node]; | ||
2209 | if (l3) | ||
2196 | drain_array(cachep, l3, l3->shared, 1, node); | 2210 | drain_array(cachep, l3, l3->shared, 1, node); |
2197 | if (l3->alien) | ||
2198 | drain_alien_cache(cachep, l3->alien); | ||
2199 | } | ||
2200 | } | 2211 | } |
2201 | } | 2212 | } |
2202 | 2213 | ||