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


Groups > linux.kernel > #1258394

Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime()

From Alex Smith <alex@alex-smith.me.uk>
Newsgroups linux.kernel
Subject Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime()
Date 2015-10-28 21:00 +0100
Message-ID <qoF34-71h-13@gated-at.bofh.it> (permalink)
References (9 earlier) <qoDDY-6eY-21@gated-at.bofh.it> <qoDND-6j4-5@gated-at.bofh.it> <qoE70-6pV-25@gated-at.bofh.it> <qoEql-6NV-15@gated-at.bofh.it> <qoEA2-6Ra-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 28 October 2015 at 19:28, Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> wrote:
> On 10/28/2015 12:04 PM, Alex Smith wrote:
>>
>> On 28 October 2015 at 18:57, Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
>> wrote:
>>>
>>>
>> As I've explained the VDSO will only use the CP0 counter in the same
>> situations that the kernel would when it is the active clocksource.
>> Any issue that makes the counter unreliable affects the kernel as well
>> and is unrelated to the VDSO, so a fix does not belong in this patch.
>
>
> What would you do if some SoC with different type of cores will define CPU1
> etc CP0_COUNT as a DIFFERENT clocksource from CPU0 (because of frequency
> etc)? Timekeeping can select CPU0 clocksource but code still uses a local
> CPU1 CP0_COUNT for gettimeofday().

Clocksources are not per-CPU. If the CP0 counter is the current
clocksource, then both the kernel and VDSO implementations of
gettimeofday will read out the CP0 counter from whatever CPU they run
on.

If in future there is some behaviour dependent on the current CPU in
the kernel gettimeofday implementation, then sure, something will need
to be done about it, but right now I see no issue that specifically
affects the VDSO code.

Alex

>
> And this kind of solution is the first in line to have an accurate timing in
> systems without GIC and with different clock frequencies.
>
> - Leonid
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[PATCH v3 3/3] MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime() Markos Chandras <markos.chandras@imgtec.com> - 2015-10-21 11:00 +0200
  Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and  clock_gettime() Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> - 2015-10-23 03:50 +0200
    Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and  clock_gettime() Ralf Baechle <ralf@linux-mips.org> - 2015-10-27 15:50 +0100
      Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and  clock_gettime() Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> - 2015-10-27 21:50 +0100
        Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and  clock_gettime() David Daney <ddaney.cavm@gmail.com> - 2015-10-27 22:10 +0100
          Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and  clock_gettime() Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> - 2015-10-27 22:20 +0100
            Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and  clock_gettime() Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> - 2015-10-27 22:50 +0100
              Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime() Alex Smith <alex@alex-smith.me.uk> - 2015-10-28 11:30 +0100
                Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and  clock_gettime() Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> - 2015-10-28 19:30 +0100
                Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime() Alex Smith <alex@alex-smith.me.uk> - 2015-10-28 19:40 +0100
                Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and  clock_gettime() Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> - 2015-10-28 20:00 +0100
                Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime() Alex Smith <alex@alex-smith.me.uk> - 2015-10-28 20:20 +0100
                Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and  clock_gettime() Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> - 2015-10-28 20:30 +0100
                Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime() Alex Smith <alex@alex-smith.me.uk> - 2015-10-28 21:00 +0100
                Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and  clock_gettime() Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> - 2015-10-28 21:20 +0100
            Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and  clock_gettime() David Daney <ddaney.cavm@gmail.com> - 2015-10-27 22:50 +0100

csiph-web