1__ROUND_JIFFIES(9)               Driver Basics              __ROUND_JIFFIES(9)
2
3
4

NAME

6       __round_jiffies - function to round jiffies to a full second
7

SYNOPSIS

9       unsigned long __round_jiffies(unsigned long j, int cpu);
10

ARGUMENTS

12       j
13           the time in (absolute) jiffies that should be rounded
14
15       cpu
16           the processor number on which the timeout will happen
17

DESCRIPTION

19       __round_jiffies rounds an absolute time in the future (in jiffies) up
20       or down to (approximately) full seconds. This is useful for timers for
21       which the exact time they fire does not matter too much, as long as
22       they fire approximately every X seconds.
23
24       By rounding these timers to whole seconds, all such timers will fire at
25       the same time, rather than at various times spread out. The goal of
26       this is to have the CPU wake up less, which saves power.
27
28       The exact rounding is skewed for each processor to avoid all processors
29       firing at the exact same time, which could lead to lock contention or
30       spurious cache line bouncing.
31
32       The return value is the rounded version of the j parameter.
33
35Kernel Hackers Manual 2.6.       November 2011              __ROUND_JIFFIES(9)
Impressum