diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2006-12-10 13:21:28 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-10 20:57:22 +0300 |
commit | 2b2842146cb4105877c2be51d3857ec61ebd4ff9 (patch) | |
tree | 526e19452cecf8a3669713bc35afcfa4e23bb296 /mm/slab.c | |
parent | 44d306e1508fef6fa7a6eb15a1aba86ef68389a6 (diff) | |
download | linux-2b2842146cb4105877c2be51d3857ec61ebd4ff9.tar.xz |
[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.c | 8 |
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) if (keventd_up() && reap_work->work.func == NULL) { init_reap_node(cpu); INIT_DELAYED_WORK(reap_work, cache_reap); - schedule_delayed_work_on(cpu, reap_work, HZ + 3 * cpu); + schedule_delayed_work_on(cpu, reap_work, + __round_jiffies_relative(HZ, cpu)); } } @@ -4006,7 +4007,7 @@ static void cache_reap(struct work_struct *unused) if (!mutex_trylock(&cache_chain_mutex)) { /* Give up. Setup the next iteration. */ schedule_delayed_work(&__get_cpu_var(reap_work), - REAPTIMEOUT_CPUC); + round_jiffies_relative(REAPTIMEOUT_CPUC)); return; } @@ -4052,7 +4053,8 @@ next: next_reap_node(); refresh_cpu_vm_stats(smp_processor_id()); /* Set up the next iteration */ - schedule_delayed_work(&__get_cpu_var(reap_work), REAPTIMEOUT_CPUC); + schedule_delayed_work(&__get_cpu_var(reap_work), + round_jiffies_relative(REAPTIMEOUT_CPUC)); } #ifdef CONFIG_PROC_FS |