aboutsummaryrefslogtreecommitdiff
path: root/mm/slab.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-05-20 00:36:08 -0400
committerJeff Garzik <jeff@garzik.org>2006-05-20 00:36:08 -0400
commit3d71b3b0b634b1a5ba8632fd9ec998e0e4aedfdb (patch)
treeaddbc37a278a126a19e03edd8270e577c75a8829 /mm/slab.c
parent8d4ee71ff6de5255ebfdf44fb83419d27bd06368 (diff)
parente2a7f77a7b4ab298a38c8d1f624628456069bdb0 (diff)
Merge branch 'upstream-fixes' into upstream
Conflicts: drivers/scsi/libata-core.c
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/mm/slab.c b/mm/slab.c
index c32af7e7581..d31a06bfbea 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -700,6 +700,14 @@ static enum {
FULL
} g_cpucache_up;
+/*
+ * used by boot code to determine if it can use slab based allocator
+ */
+int slab_is_available(void)
+{
+ return g_cpucache_up == FULL;
+}
+
static DEFINE_PER_CPU(struct work_struct, reap_work);
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)
check_irq_on();
for_each_online_node(node) {
l3 = cachep->nodelists[node];
- if (l3) {
+ if (l3 && l3->alien)
+ drain_alien_cache(cachep, l3->alien);
+ }
+
+ for_each_online_node(node) {
+ l3 = cachep->nodelists[node];
+ if (l3)
drain_array(cachep, l3, l3->shared, 1, node);
- if (l3->alien)
- drain_alien_cache(cachep, l3->alien);
- }
}
}