linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* clock_gettime.2: _COARSE clocks are not always faster...
@ 2016-04-09 16:50 Rasmus Villemoes
       [not found] ` <87k2k67ml4.fsf-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Rasmus Villemoes @ 2016-04-09 16:50 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-man-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ

Hi Michael

The other day, I was curious how the vdso was implemented on ppc, and I
noted that neither ppc32 or ppc64 handle the _COARSE versions of
CLOCK_{REALTIME,MONOTONIC} in the vdso, so they fall back to an actual
syscall. And sure enough, measuring CLOCK_MONOTONIC
vs. CLOCK_MONOTONIC_COARSE shows that the latter has three times as much
overhead as the former.

Whether it's worth adding a note to the man page is up to you.

Best,
Rasmus
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: clock_gettime.2: _COARSE clocks are not always faster...
       [not found] ` <87k2k67ml4.fsf-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
@ 2016-04-18 15:12   ` Michael Kerrisk (man-pages)
       [not found]     ` <5714F972.6080603-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Kerrisk (man-pages) @ 2016-04-18 15:12 UTC (permalink / raw)
  To: Rasmus Villemoes
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
	linux-man-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ

Hello Rasmus,

On 04/09/2016 05:50 PM, Rasmus Villemoes wrote:
> Hi Michael
> 
> The other day, I was curious how the vdso was implemented on ppc, and I
> noted that neither ppc32 or ppc64 handle the _COARSE versions of
> CLOCK_{REALTIME,MONOTONIC} in the vdso, so they fall back to an actual
> syscall. And sure enough, measuring CLOCK_MONOTONIC
> vs. CLOCK_MONOTONIC_COARSE shows that the latter has three times as much
> overhead as the former.
> 
> Whether it's worth adding a note to the man page is up to you.

I think it's useful to do so. For both *COARSE flags, I added:

[[
Requires per-architecture support, and probably also architecture support
for this flag in the vdso(7).
]]

Thanks!

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: clock_gettime.2: _COARSE clocks are not always faster...
       [not found]     ` <5714F972.6080603-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-04-18 15:23       ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Kerrisk (man-pages) @ 2016-04-18 15:23 UTC (permalink / raw)
  To: Rasmus Villemoes
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
	linux-man-u79uwXL29TY76Z2rM5mHXA,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ

On 04/18/2016 04:12 PM, Michael Kerrisk (man-pages) wrote:
> Hello Rasmus,
> 
> On 04/09/2016 05:50 PM, Rasmus Villemoes wrote:
>> Hi Michael
>>
>> The other day, I was curious how the vdso was implemented on ppc, and I
>> noted that neither ppc32 or ppc64 handle the _COARSE versions of
>> CLOCK_{REALTIME,MONOTONIC} in the vdso, so they fall back to an actual
>> syscall. And sure enough, measuring CLOCK_MONOTONIC
>> vs. CLOCK_MONOTONIC_COARSE shows that the latter has three times as much
>> overhead as the former.
>>
>> Whether it's worth adding a note to the man page is up to you.
> 
> I think it's useful to do so. For both *COARSE flags, I added:
> 
> [[
> Requires per-architecture support, and probably also architecture support
> for this flag in the vdso(7).
> ]]

And in the PowerPC sections of vdso(7), I added:

       The CLOCK_REALTIME_COARSE and CLOCK_MONOTONIC_COARSE clocks are
       not   supported   by   the   __kernel_clock_getres  and  __ker‐
       nel_clock_gettime interfaces; the kernel falls back to the real
       system call.

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-18 15:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-09 16:50 clock_gettime.2: _COARSE clocks are not always faster Rasmus Villemoes
     [not found] ` <87k2k67ml4.fsf-qQsb+v5E8BnlAoU/VqSP6n9LOBIZ5rWg@public.gmane.org>
2016-04-18 15:12   ` Michael Kerrisk (man-pages)
     [not found]     ` <5714F972.6080603-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-04-18 15:23       ` Michael Kerrisk (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).