aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2007-05-09 05:34:22 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-09 15:30:53 -0400
commit5830c5902138f80b0a097b797200c739466beedd (patch)
treef325f18365db79f9d17793b8d551e81094f48e15 /mm
parenta4798833d26b293fd18b7bf102991426aa0b56fd (diff)
slab: shut down cache_reaper when cpu goes down
Shutdown the cache_reaper if the cpu is brought down and set the cache_reap.func to NULL. Otherwise hotplug shuts down the reaper for good. Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/slab.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/mm/slab.c b/mm/slab.c
index cceb347a354e..1a7a10de2a4d 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1279,6 +1279,20 @@ static int __cpuinit cpuup_callback(struct notifier_block *nfb,
1279 start_cpu_timer(cpu); 1279 start_cpu_timer(cpu);
1280 break; 1280 break;
1281#ifdef CONFIG_HOTPLUG_CPU 1281#ifdef CONFIG_HOTPLUG_CPU
1282 case CPU_DOWN_PREPARE:
1283 /*
1284 * Shutdown cache reaper. Note that the cache_chain_mutex is
1285 * held so that if cache_reap() is invoked it cannot do
1286 * anything expensive but will only modify reap_work
1287 * and reschedule the timer.
1288 */
1289 cancel_rearming_delayed_work(&per_cpu(reap_work, cpu));
1290 /* Now the cache_reaper is guaranteed to be not running. */
1291 per_cpu(reap_work, cpu).work.func = NULL;
1292 break;
1293 case CPU_DOWN_FAILED:
1294 start_cpu_timer(cpu);
1295 break;
1282 case CPU_DEAD: 1296 case CPU_DEAD:
1283 /* 1297 /*
1284 * Even if all the cpus of a node are down, we don't free the 1298 * Even if all the cpus of a node are down, we don't free the