Skip to contentSkip to conversation

Is there a problem in timeval_to_jiffies?

DISCUSSION Andi Kleen 1 participant 1 message Sep 29, 2004 8 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

Andi Kleen

author
#8 lore raw
Quoted 4 lines · Tim Bird
Quoted 3 lines · Henry Margies

Right? But for arm, with a jiffie size of 10000000, it is much more easier. And that is why I don't understand why an one second interval is converted to 101 jiffies (on arm).

Quoted 8 lines

...

Quoted 4 lines

I agree. But then, why adding one jiffie to every interval? If there is no latency, the timer should appear right at the beginning of a jiffie. For x86 you are right, because 10 jiffies are less then 10ms. But for arm, 1 jiffie is precisely 10ms.

How does the computer "know" that the timer is at the beginning of the jiffy? By definition, Linux (without HRT support) has

do_gettimeofday() or better the posix monotonic clock normally have much better resolution than a jiffie (on x86 typically the resolution of the CPU clock) xtime is the T-O-D of the last jiffie However calling do_gettimeofday and doing the calculation may be too expensive.

-Andi