Re: [PATCH 1/6] new timeofday core subsystem for -mm (v.B3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2005-06-21 at 08:55 -0600, Chris Friesen wrote:
> Lee Revell wrote:
> 
> > But some user space apps are now *required* to use rdtsc for timing due
> > to the massive performance difference.  If we only took a 5x or 10x
> > performance hit vs rdtsc, rather than the current 50x, it might be
> > enough that user space apps won't have to do this.
> 
> For my userspace apps I've actually switched to 
> clock_gettime(CLOCK_MONOTONIC, &ts);
> 
> This at least guarantees that it will never go backwards.
> 
> For the experts: Is there a clock exported to userspace that is both 
> monotonic and uniform?  Does CLOCK_MONOTONIC give this on linux?

clock_gettime(CLOCK_MONOTONIC) should be what you're looking for. Since
that still uses do_gettimeofday internally, it is still possible in some
conditions for the current code to have time inconsistencies caused by
interpolation error. This is one of the major reasons for my work.

thanks
-john

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux