public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] slab: Use same schedule timeout for all cpus in cache_reap
@ 2005-10-29 11:34 Manfred Spraul
  0 siblings, 0 replies; only message in thread
From: Manfred Spraul @ 2005-10-29 11:34 UTC (permalink / raw)
  To: Andrew Morton; +Cc: kenneth.w.chen, Andi Kleen, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 375 bytes --]

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 <manfred@colorfullife.com>

[-- Attachment #2: patch-slab-notimeoffset --]
[-- Type: text/plain, Size: 694 bytes --]

--- 2.6/mm/slab.c	2005-10-29 13:17:44.000000000 +0200
+++ build-2.6/mm/slab.c	2005-10-29 13:18:14.000000000 +0200
@@ -3276,7 +3276,7 @@
 
 	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;
 	}
 
@@ -3345,7 +3345,7 @@
 	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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-10-29 11:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-29 11:34 [PATCH] slab: Use same schedule timeout for all cpus in cache_reap Manfred Spraul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox