lkml.org 
[lkml]   [2012]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 01/16] math128: Introduce various 128bit primitives
From
Date
On Fri, 2012-10-26 at 08:39 -0400, Steven Rostedt wrote:
> On Fri, 2012-10-26 at 12:36 +0200, Thomas Gleixner wrote:
>
> > By all means. nsec precision is a completly academic thought
> > exercise. It's really pointless to even think about anything below
> > microseconds resolution.
> >
> > We can still have the user space interface handing in the information
> > in nsec resolution, but it's reasonable to scale it down to something
> > useful. Just shift the incoming information right by 10, so you're in
> > the 1us resolution for all the internal math and all your limitation
> > problems are gone. A shift by ten for converting back and forth to
> > nsecs is not a real performance issue.
>
> Just make sure this is well documented in the man pages, and that should
> eliminate any "surprises". This is a new interface, we can just make
> this part of the ABI. "The units are in nanoseconds, but all
> calculations are performed to the nearest microsecond. Take this into
> account for error analysis". People should be fine with this.

Actually, a shift by 10 is a division by 1024, which is not truly down
to a microsecond. Would just a shift by 9 work as well? This would make
the resolution closer to a half of microsecond. Otherwise things will
probably get screwy if the user passes in 1000 ns, and gets a zero
result.

-- Steve




\
 
 \ /
  Last update: 2012-10-26 15:41    [W:0.269 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site