Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1720416

Re: [RFC][PATCH 4/4] time: Clean up CLOCK_MONOTONIC_RAW time handling

From John Stultz <john.stultz@linaro.org>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH 4/4] time: Clean up CLOCK_MONOTONIC_RAW time handling
Date 2017-08-25 23:20 +0200
Message-ID <uiubf-L8-7@gated-at.bofh.it> (permalink)
References <tLAK5-6i9-1@gated-at.bofh.it> <tLAK5-6i9-3@gated-at.bofh.it> <uin9M-4Gg-11@gated-at.bofh.it> <uirZM-7EI-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Aug 25, 2017 at 11:55 AM, John Stultz <john.stultz@linaro.org> wrote:
> I'll look over the code again to see if I can catch anything by
> review. Worse case if we can't get any traction on this in a day or so
> I'll submit a revert.

I think I found the issue. In tk_update_ktime_data() I add the raw_sec
and shifted down  tk->tkr_raw.xtime_nsec to the base. But we already
add the tk->tkr_raw.xtime_nsec to the offset and shift it all down in
the timekeeping_delta_to_ns called from ktime_get_raw, so we
effectively are accumulating the nsecs portion faster then we should.

This only crops up for internal ktime_get_raw() users, but not
getrawmonotonic64() which uses the timespec generation rather then the
ktime method, which is why this wasn't seen by userspace time tests.

I'll send a patch for testing shortly.

thanks
-john

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [RFC][PATCH 4/4] time: Clean up CLOCK_MONOTONIC_RAW time handling Chris Wilson <chris@chris-wilson.co.uk> - 2017-08-25 15:50 +0200
  Re: [RFC][PATCH 4/4] time: Clean up CLOCK_MONOTONIC_RAW time handling John Stultz <john.stultz@linaro.org> - 2017-08-25 21:00 +0200
    Re: [RFC][PATCH 4/4] time: Clean up CLOCK_MONOTONIC_RAW time handling John Stultz <john.stultz@linaro.org> - 2017-08-25 23:20 +0200
  [RFC][PATCH] time: Fix ktime_get_raw() issues caused by incorrect base accumulation John Stultz <john.stultz@linaro.org> - 2017-08-26 01:00 +0200
    Re: [RFC][PATCH] time: Fix ktime_get_raw() issues caused by incorrect base  accumulation Chris Wilson <chris@chris-wilson.co.uk> - 2017-08-26 12:30 +0200
    [tip:timers/urgent] time: Fix ktime_get_raw() incorrect base  accumulation tip-bot for John Stultz <tipbot@zytor.com> - 2017-08-26 16:20 +0200

csiph-web