]> git.hungrycats.org Git - linux/commit
[PATCH] Fine tune the time conversion to eliminate conversion errors.
authorAndrew Morton <akpm@osdl.org>
Wed, 4 Feb 2004 02:47:54 +0000 (18:47 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 4 Feb 2004 02:47:54 +0000 (18:47 -0800)
commit03718ae0c12130f6e2d24312b671f25466414dde
tree1f82b4f0801bcf917421fb5e6bf22ee4181d9c43
parent80cfa786f90d133a99318620594ff7709a0ee092
[PATCH] Fine tune the time conversion to eliminate conversion errors.

From: George Anzinger <george@mvista.com>

The time conversion code is erroring on the side of a bit too small.  The
attached patch forces any error to be on the high side.  The current code will
convert 1 nanosecond to zero jiffies (standard says that should be 1).  It also
is around 1 nanosecond late on each roll to the next jiffie.

I have done some error checks with this patch applied and get the following
errors in PPB ( Parts Per Billion):

HZ     nano sec conversion     microsecond conversion
1000    315                      45
1024    227                      40
100     28                       317

In all cases the error is on the high side, which means that the final shift
will, most likely, eliminate the error bits.
include/linux/time.h