From: Greg KH <gregkh@linuxfoundation.org>
To: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>,
Chris Paterson <Chris.Paterson2@renesas.com>,
Biju Das <biju.das@bp.renesas.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] time: Fix CLOCK_MONOTONIC_RAW sub-nanosecond accounting
Date: Mon, 21 May 2018 21:03:14 +0200 [thread overview]
Message-ID: <20180521190314.GA9667@kroah.com> (raw)
In-Reply-To: <1526925446-6067-1-git-send-email-fabrizio.castro@bp.renesas.com>
On Mon, May 21, 2018 at 06:57:26PM +0100, Fabrizio Castro wrote:
> From: John Stultz <john.stultz@linaro.org>
>
> commit 3d88d56c5873f6eebe23e05c3da701960146b801 upstream.
>
> Due to how the MONOTONIC_RAW accumulation logic was handled,
> there is the potential for a 1ns discontinuity when we do
> accumulations. This small discontinuity has for the most part
> gone un-noticed, but since ARM64 enabled CLOCK_MONOTONIC_RAW
> in their vDSO clock_gettime implementation, we've seen failures
> with the inconsistency-check test in kselftest.
>
> This patch addresses the issue by using the same sub-ns
> accumulation handling that CLOCK_MONOTONIC uses, which avoids
> the issue for in-kernel users.
>
> Since the ARM64 vDSO implementation has its own clock_gettime
> calculation logic, this patch reduces the frequency of errors,
> but failures are still seen. The ARM64 vDSO will need to be
> updated to include the sub-nanosecond xtime_nsec values in its
> calculation for this issue to be completely fixed.
>
> Signed-off-by: John Stultz <john.stultz@linaro.org>
> Tested-by: Daniel Mentz <danielmentz@google.com>
> Cc: Prarit Bhargava <prarit@redhat.com>
> Cc: Kevin Brodsky <kevin.brodsky@arm.com>
> Cc: Richard Cochran <richardcochran@gmail.com>
> Cc: Stephen Boyd <stephen.boyd@linaro.org>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: "stable #4 . 8+" <stable@vger.kernel.org>
> Cc: Miroslav Lichvar <mlichvar@redhat.com>
> Link: http://lkml.kernel.org/r/1496965462-20003-3-git-send-email-john.stultz@linaro.org
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> [fabrizio: cherry-pick to 4.4. Kept cycle_t type for function
> logarithmic_accumulation local variable "interval". Dropped
> casting of "interval" variable]
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> ---
> Hello Greg,
>
> we noticed tools/testing/selftests/timers/clocksource-switch.c
> was failing for us, this patch fixes the cause of the failure.
> Are you happy to take this patch?
For what kernel tree(s)?
And why did you not cc: the developers and maintainer of this subsystem?
thanks,
greg k-h
next prev parent reply other threads:[~2018-05-21 19:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-21 17:57 [PATCH] time: Fix CLOCK_MONOTONIC_RAW sub-nanosecond accounting Fabrizio Castro
2018-05-21 19:03 ` Greg KH [this message]
2018-05-22 8:53 ` Fabrizio Castro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180521190314.GA9667@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Chris.Paterson2@renesas.com \
--cc=ben.hutchings@codethink.co.uk \
--cc=biju.das@bp.renesas.com \
--cc=fabrizio.castro@bp.renesas.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.