From: Manfred Spraul Date: Mon, 7 Nov 2005 08:58:02 +0000 (-0800) Subject: [PATCH] slab: Use same schedule timeout for all cpus in cache_reap X-Git-Tag: v2.6.15-rc1~703 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd61ef6268ac52d3dfa5626d1e0306a91b3b2608;p=platform%2Fkernel%2Flinux-exynos.git [PATCH] slab: Use same schedule timeout for all cpus in cache_reap Chen noticed that cache_reap uses REAPTIMEOUT_CPUC+smp_processor_id() as the timeout for rescheduling. The "+smp_processor_id()" part is wrong, the timeout should be identical for all cpus: start_cpu_timer already adds a cpu dependant offset to avoid any clustering. The attached patch removes smp_processor_id(). Signed-Off-By: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/slab.c b/mm/slab.c index d77e5f5..1db4d73 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -3279,7 +3279,7 @@ static void cache_reap(void *unused) if (down_trylock(&cache_chain_sem)) { /* Give up. Setup the next iteration. */ - schedule_delayed_work(&__get_cpu_var(reap_work), REAPTIMEOUT_CPUC + smp_processor_id()); + schedule_delayed_work(&__get_cpu_var(reap_work), REAPTIMEOUT_CPUC); return; } @@ -3348,7 +3348,7 @@ next: up(&cache_chain_sem); drain_remote_pages(); /* Setup the next iteration */ - schedule_delayed_work(&__get_cpu_var(reap_work), REAPTIMEOUT_CPUC + smp_processor_id()); + schedule_delayed_work(&__get_cpu_var(reap_work), REAPTIMEOUT_CPUC); } #ifdef CONFIG_PROC_FS