]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
slab: use deferable timers for its periodic housekeeping
authorArjan van de Ven <arjan@linux.intel.com>
Mon, 19 Jul 2010 17:59:42 +0000 (10:59 -0700)
committerPekka Enberg <penberg@cs.helsinki.fi>
Tue, 20 Jul 2010 07:03:23 +0000 (10:03 +0300)
slab has a "once every 2 second" timer for its housekeeping.
As the number of logical processors is growing, its more and more
common that this 2 second timer becomes the primary wakeup source.

This patch turns this housekeeping timer into a deferable timer,
which means that the timer does not interrupt idle, but just runs
at the next event that wakes the cpu up.

The impact is that the timer likely runs a bit later, but during the
delay no code is running so there's not all that much reason for
a difference in housekeeping to occur because of this delay.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
mm/slab.c

index e49f8f46f46d6878dba427dae10fc9b5fb153a9f..29aad44a55c2d7fb40e2a0c888cea61de130c944 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -861,7 +861,7 @@ static void __cpuinit start_cpu_timer(int cpu)
         */
        if (keventd_up() && reap_work->work.func == NULL) {
                init_reap_node(cpu);
-               INIT_DELAYED_WORK(reap_work, cache_reap);
+               INIT_DELAYED_WORK_DEFERRABLE(reap_work, cache_reap);
                schedule_delayed_work_on(cpu, reap_work,
                                        __round_jiffies_relative(HZ, cpu));
        }