Messages in this thread | | | Subject | Re: [PATCH 2/2] Add a thread cpu time implementation to vDSO | From | john stultz <> | Date | Mon, 12 Dec 2011 15:52:53 -0800 |
| |
On Mon, 2011-12-12 at 15:41 -0800, Andrew Lutomirski wrote: > On Mon, Dec 12, 2011 at 3:32 PM, john stultz <johnstul@us.ibm.com> wrote: > > Is it just that you're concerned about the clockid switch costs being > > too high? > > From my (old, from memory) measurements, the switch cost is very very > low if it's predicted correctly, and the main case where it's likely > to be mispredicted is when it hasn't been called in awhile, in which > case either probably no one cares or the cache misses will dominate. > > How worried are you about introducing a year 2554 bug? Python says: > > >>> dateutil.parser.parse('1/1/1970') + datetime.timedelta(seconds = 2**64 // 1000000000) > datetime.datetime(2554, 7, 21, 23, 34, 33)
Not very. :)
Worse case the syscall can expose a nsec_t or something that can be bumped to u128 when that becomes common.
thanks -john
| |