lkml.org 
[lkml]   [2012]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip:timers/core] ntp: Fix integer overflow when setting time
On 03/16/2012 02:48 AM, Thomas Gleixner wrote:
>>
>> Perhaps we should use the same kind of multiply-and-shift tricks we're
>> doing for jiffies conversion? If nothing else it ought to perform better.
>
> It's not a hotpath where performance matters, but divide by zero does :)

Doing the inverse multiply wouldn't have a divide by zero problem. What
perhaps is more important (and the reason we went to shift-multiply) is
that in addition to being faster, it also avoids unnnecessary overflows.
I would really like to figure out how to do proper shift-multiply for
the 64-bit jiffy conversions too.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.



\
 
 \ /
  Last update: 2012-03-16 15:45    [from the cache]
©2003-2011 Jasper Spaans