lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 4 Sep 2013 11:51:38 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	Arun Sharma <asharma@...com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Kumar Sundararajan <kumar@...com>,
	John Stultz <johnstul@...ibm.com>
Subject: Re: clock_gettime_ns

I think that most of the hangup was a lack of agreement on how the API
should work wrt leap seconds.

I've always thought that the Right Way to represent a UTC time is
nanoseconds since some epoch, where every potential leap second
counts.

Pros:
 - Unambiguously convertible to and from
year/month/day/hour/minute/second/nanosecond.
 - Monotonic
 - Compact

Cons:
 - Computing differences between timestamps requires a table.  (Note:
y/m/d/h/m/s/ns has the same problem.)
 - Weird: no one does this
 - If you naively subtract times, you end up with jumps forward.  (But
jumps forward are much less likely to break things than jumps
backwards.)
 - Almost, but not quite, compatible with timespec, so it could cause confusion.

If someone wants a hard problem, find a way to implement clock_gettime
that almost never spins or otherwise block and is continuous.  I've
thought about it a bit and have something that almost works.

--Andy

On Wed, Sep 4, 2013 at 2:18 AM, Arun Sharma <asharma@...com> wrote:
> A couple of years ago Andy posted this patch series:
>
> http://thread.gmane.org/gmane.linux.kernel/1233209/
>
> These patches have been in use at facebook for a couple of years and along
> with a vDSO implementation of thread_cpu_time(), they have proven useful for
> our profilers.
>
> I didn't see any arguments against this patch series. Did I miss some
> discussion on the topic?
>
>  -Arun



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ