aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2006-12-10 05:21:28 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-10 12:57:22 -0500
commit2b2842146cb4105877c2be51d3857ec61ebd4ff9 (patch)
tree526e19452cecf8a3669713bc35afcfa4e23bb296 /mm/slab.c
parent44d306e1508fef6fa7a6eb15a1aba86ef68389a6 (diff)
[PATCH] user of the jiffies rounding patch: Slab
This patch introduces users of the round_jiffies() function in the slab code. The slab code has a few "run every second" timers for background work; these are obviously not timing critical as long as they happen roughly at the right frequency. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 56af694c9e6a..2c655532f5ef 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -946,7 +946,8 @@ static void __devinit start_cpu_timer(int cpu)
946 if (keventd_up() && reap_work->work.func == NULL) { 946 if (keventd_up() && reap_work->work.func == NULL) {
947 init_reap_node(cpu); 947 init_reap_node(cpu);
948 INIT_DELAYED_WORK(reap_work, cache_reap); 948 INIT_DELAYED_WORK(reap_work, cache_reap);
949 schedule_delayed_work_on(cpu, reap_work, HZ + 3 * cpu); 949 schedule_delayed_work_on(cpu, reap_work,
950 __round_jiffies_relative(HZ, cpu));
950 } 951 }
951} 952}
952 953
@@ -4006,7 +4007,7 @@ static void cache_reap(struct work_struct *unused)
4006 if (!mutex_trylock(&cache_chain_mutex)) { 4007 if (!mutex_trylock(&cache_chain_mutex)) {
4007 /* Give up. Setup the next iteration. */ 4008 /* Give up. Setup the next iteration. */
4008 schedule_delayed_work(&__get_cpu_var(reap_work), 4009 schedule_delayed_work(&__get_cpu_var(reap_work),
4009 REAPTIMEOUT_CPUC); 4010 round_jiffies_relative(REAPTIMEOUT_CPUC));
4010 return; 4011 return;
4011 } 4012 }
4012 4013
@@ -4052,7 +4053,8 @@ next:
4052 next_reap_node(); 4053 next_reap_node();
4053 refresh_cpu_vm_stats(smp_processor_id()); 4054 refresh_cpu_vm_stats(smp_processor_id());
4054 /* Set up the next iteration */ 4055 /* Set up the next iteration */
4055 schedule_delayed_work(&__get_cpu_var(reap_work), REAPTIMEOUT_CPUC); 4056 schedule_delayed_work(&__get_cpu_var(reap_work),
4057 round_jiffies_relative(REAPTIMEOUT_CPUC));
4056} 4058}
4057 4059
4058#ifdef CONFIG_PROC_FS 4060#ifdef CONFIG_PROC_FS