[PATCH] slab: Don't scan cache_cache

From: Pekka J Enberg
Date: Fri Feb 24 2006 - 02:50:42 EST


From: Pekka Enberg <penberg@xxxxxxxxxxxxxx>

The cache_cache object cache is used for bootstrapping, but the cache is
essentially static. It is unlikely that we ever have more than one page
allocated for it. As SLAB_NO_REAP is gone now, fix a regression by skipping
cache_cache explicitly in cache_reap().

Boot-tested with UML.

Cc: Christoph Lameter <clameter@xxxxxxx>
Cc: Alok Kataria <alok.kataria@xxxxxxxxxxxxxx>
Cc: Ravikiran G Thirumalai <kiran@xxxxxxxxxxxx>
Cc: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx>
Cc: Mark Fasheh <mark.fasheh@xxxxxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxxxxxx>
---

mm/slab.c | 4 ++++
1 file changed, 4 insertions(+)

Index: 2.6-git/mm/slab.c
===================================================================
--- 2.6-git.orig/mm/slab.c
+++ 2.6-git/mm/slab.c
@@ -3483,6 +3483,10 @@ static void cache_reap(void *unused)
struct slab *slabp;

searchp = list_entry(walk, struct kmem_cache, next);
+
+ if (searchp == &cache_cache)
+ goto next;
+
check_irq_on();

l3 = searchp->nodelists[numa_node_id()];
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/