Re: [PATCH v7 04/25] arm64: Substitute gettimeofday with C implementation
From: Vincenzo Frascino
Date: Sat Jun 29 2019 - 02:58:23 EST
Hi Sylwester,
thank you for the quick turn around to my email.
On 6/28/19 5:50 PM, Sylwester Nawrocki wrote:
> Hi Vincenzo,
>
> On 6/28/19 16:32, Vincenzo Frascino wrote:
>> On 6/28/19 2:09 PM, Marek Szyprowski wrote:
>>> On 2019-06-21 11:52, Vincenzo Frascino wrote:
>>>> To take advantage of the commonly defined vdso interface for
>>>> gettimeofday the architectural code requires an adaptation.
>>>>
>>>> Re-implement the gettimeofday vdso in C in order to use lib/vdso.
>>>>
>>>> With the new implementation arm64 gains support for CLOCK_BOOTTIME
>>>> and CLOCK_TAI.
>>>>
>>>> Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
>>>> Cc: Will Deacon <will.deacon@xxxxxxx>
>>>> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@xxxxxxx>
>>>> Tested-by: Shijith Thotton <sthotton@xxxxxxxxxxx>
>>>> Tested-by: Andre Przywara <andre.przywara@xxxxxxx>
>>>> Signed-off-by: Catalin Marinas <catalin.marinas@xxxxxxx>
>>>
>>> This patch causes serious regression on Samsung Exynos5433 SoC based
>>> TM2(e) boards. The time in userspace is always set to begin of the epoch:
>>>
>>> # date 062813152019
>>> Fri Jun 28 13:15:00 UTC 2019
>>> # date
>>> Thu Jan 1 00:00:00 UTC 1970
>>> # date
>>> Thu Jan 1 00:00:00 UTC 1970
>>>
>>> I've noticed that since the patch landed in Linux next-20190625 and
>>> bisect indeed pointed to this patch.
>>>
>> Thank you for reporting this, seems that the next that you posted is missing
>> some fixes for arm64.
>>
>> Could you please try the tree below?
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/vdso
>>
>> Let us know if the functionality is restored. Otherwise the issue will require
>> further investigation.
>
> Marek is already out for holidays, I gave your tree a try but kernel from
> that branch was failing to boot on TM2(e).
>
> Then I have cherry-picked 5 patches from the branch that seemed to
> be missing in next-20190628:
>
> 28028f3174cf1 (HEAD) MAINTAINERS: Fix Andy's surname and the directory entries of VDSO
> ec8f8e4bf2206 arm64: vdso: Fix compilation with clang older than 8
> 721882ebb5729 arm64: compat: Fix __arch_get_hw_counter() implementation
> 7027fea977a3d arm64: Fix __arch_get_hw_counter() implementation
> 10b305853fe22 lib/vdso: Make delta calculation work correctly
> 48568d8c7f479 (tag: next-20190628, linux-next/master) Add linux-next specific files for 20190628
>
> With those 5 additional patches on top of next-20190628 the problem
> is not observed any more. date, ping, etc. seems to be working well.
>
> # date
> Fri Jun 28 16:39:22 UTC 2019
> #
> # systemctl stop systemd-timesyncd
> #
> # date 062818392019
> Fri Jun 28 18:39:00 UTC 2019
> # date
> Fri Jun 28 18:39:01 UTC 2019
> #
> # date 062818432019; date
> Fri Jun 28 18:43:00 UTC 2019
> Fri Jun 28 18:43:00 UTC 2019
> # date
> Fri Jun 28 18:43:04 UTC 2019
>
This seems ok, thanks for spending some time to test our patches against your board.
If I may, I would like to ask to you one favor, could you please keep an eye on
next and once those patches are merged repeat the test?
I want just to make sure that the regression does not reappear.
Have a nice weekend.
> --
> Regards,
> Sylwester
>
--
Regards,
Vincenzo