lkml.org 
[lkml]   [2005]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Lse-tech] [RFC][Patch 1/5] nanosecond timestamps and diffs
john stultz wrote:
> On Mon, 2005-12-12 at 19:31 +0000, Shailabh Nagar wrote:
>
>>Christoph Lameter wrote:
>>
>>>On Wed, 7 Dec 2005, Shailabh Nagar wrote:
>>>
>>>
>>>
>>>>+void getnstimestamp(struct timespec *ts)
>>>
>>>
>>>There is already getnstimeofday in the kernel.
>>>
>>
>>Yes, and that function is being used within the getnstimestamp() being proposed.
>>However, John Stultz had advised that getnstimeofday could get affected by calls to
>>settimeofday and had recommended adjusting the getnstimeofday value with wall_to_monotonic.
>>
>>John, could you elaborate ?
>
>
> I think you pretty well have it covered.
>
> getnstimeofday + wall_to_monotonic should be higher-res and more
> reliable (then TSC based sched_clock(), for example) for getting a
> timestamp.
>
> There may be performance concerns as you have to access the clock
> hardware in getnstimeofday(), but there really is no other way for
> reliable finely grained monotonically increasing timestamps.
>
> thanks
> -john

Thanks, that clarifies. I guess the other underlying concern here would be whether these
improvements (in resolution and reliability) should be going into getnstimeofday()
itself (rather than creating a new func for the same) ? Or is it better to leave
getnstimeofday as it is ?

Thanks,
Shailabh

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-12-12 21:03    [W:0.081 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site