svn commit: r363125 - head/sys/compat/linux
Conrad Meyer
cem at freebsd.org
Sun Jul 12 23:28:02 UTC 2020
Hi Alexander,
On Sun, Jul 12, 2020 at 2:51 AM Alexander Leidinger
<netchild at freebsd.org> wrote:
>
> Author: netchild
> Date: Sun Jul 12 09:51:09 2020
> New Revision: 363125
> URL: https://svnweb.freebsd.org/changeset/base/363125
>
> Log:
> Implement CLOCK_MONOTONIC_RAW (linux >= 2.6.28).
>
> It is documented as a raw hardware-based clock not subject to NTP or
> incremental adjustments. With this "not as precise as CLOCK_MONOTONIC"
> description in mind, map it to our CLOCK_MONOTNIC_FAST (the same
> mapping as for the linux CLOCK_MONOTONIC_COARSE).
Can you point at the documentation suggesting CLOCK_MONOTONIC_RAW is
any less precise than CLOCK_MONOTONIC? I'm looking at the Linux
manual page and it does not seem to contain any language to that
effect.
> This is needed for the webcomponent of steam (chromium) and some
> other steam component or game.
>
> The linux-steam-utils port contains a LD_PRELOAD based fix for this.
> There this is mapped to CLOCK_MONOTONIC.
> As an untrained ear/eye (= the majority of people) is normaly not
> noticing a difference of jitter in the 10-20 ms range, specially
> if you don't pay attention like for example in a browser session
> while watching a video stream, the mapping to CLOCK_MONOTONIC_FAST
> seems more appropriate than to CLOCK_MONOTONIC.
I don't know how these programs use the clock, but 10-20 ms of jitter
in the UI is noticeable to even casual users. (In FreeBSD these
functions are purportedly accurate to 1 timer tick, which is 1ms on
HZ=1000 (amd64) — much better than 10-20ms.) However, I'm concerned
this is still insufficient precision compared with the documented
behavior of the Linux functions. I think regular CLOCK_MONOTONIC is
the closest thing we've got to Linux's CLOCK_MONOTONIC_RAW. The Linux
analog of _FAST is _COARSE.
Best,
Conrad
More information about the svn-src-head
mailing list