From: Arjan van de Ven 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 Signed-off-by: Andrew Morton --- mm/slab.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff -puN mm/slab.c~user-of-the-jiffies-rounding-patch-slab mm/slab.c --- a/mm/slab.c~user-of-the-jiffies-rounding-patch-slab +++ a/mm/slab.c @@ -945,7 +945,7 @@ static void __devinit start_cpu_timer(in if (keventd_up() && reap_work->func == NULL) { init_reap_node(cpu); INIT_WORK(reap_work, cache_reap, NULL); - schedule_delayed_work_on(cpu, reap_work, HZ + 3 * cpu); + schedule_delayed_work_on(cpu, reap_work, __round_jiffies_relative(HZ, cpu)); } } @@ -3851,7 +3851,7 @@ static void cache_reap(void *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; } @@ -3897,7 +3897,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 _