From owner-svn-src-head@freebsd.org Sun Jul 12 23:28:02 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D08D0351DEF; Sun, 12 Jul 2020 23:28:02 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4jcy3l5pz49bd; Sun, 12 Jul 2020 23:28:02 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-oi1-f169.google.com with SMTP id r8so9542153oij.5; Sun, 12 Jul 2020 16:28:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=lxXaS7tfiFINYnFticiFb8Vl/spAXgbyhYzWVSOb0C0=; b=LDZUM239sIbTfcGsebyLDChSNiZaaZY3Lij9UROjeDS80s4VP3Z0J6nfjZyIMpGdg4 oLj3jom8Qp4geem/gQSjaD75qwmFeZMSpdM183y806n5RVDaCHbMIhuLdjBl1Rz+KACV UY2lYSLFoEskmOZpDFDPMeS3jZQCuMgua2JzgzehMK4x20Z1HKLos42AOje8ybud5OVn OToQ/XsE2UqQZh5gvSo5NQ62H71ZhH4ru64z/y56+Vkl1o0PWiy9EmM2L4tWv4mZmgl2 S5SY2k2W9+PwORI8f/8EfNr5w7Q9GH+bAWDj3IwKkdXU2GBXTrxsFpo7CBtzQD2ezuCR VOXg== X-Gm-Message-State: AOAM5309m/xvTci9CDVhojiVvu+0w0qvqaghrQML1jDUOKxg8vvLdqZp v6zk6RtnaXBrGnexXasdaeNsDNG9 X-Google-Smtp-Source: ABdhPJzvesxak2Z/0EuRRioYJmHive1svmCwZfzWfU6A5/rMxDKOXTRyr4CKR/PNpGMVpXgFtdo4Jw== X-Received: by 2002:a05:6808:7cc:: with SMTP id f12mr11610848oij.52.1594596480864; Sun, 12 Jul 2020 16:28:00 -0700 (PDT) Received: from mail-ot1-f42.google.com (mail-ot1-f42.google.com. [209.85.210.42]) by smtp.gmail.com with ESMTPSA id r18sm2724300otd.59.2020.07.12.16.28.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Jul 2020 16:28:00 -0700 (PDT) Received: by mail-ot1-f42.google.com with SMTP id a21so8213242otq.8; Sun, 12 Jul 2020 16:28:00 -0700 (PDT) X-Received: by 2002:a9d:561a:: with SMTP id e26mr3066372oti.216.1594596480319; Sun, 12 Jul 2020 16:28:00 -0700 (PDT) MIME-Version: 1.0 References: <202007120951.06C9pA4F024281@repo.freebsd.org> In-Reply-To: <202007120951.06C9pA4F024281@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Sun, 12 Jul 2020 16:27:49 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r363125 - head/sys/compat/linux To: Alexander Leidinger Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4B4jcy3l5pz49bd X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 23:28:02 -0000 Hi Alexander, On Sun, Jul 12, 2020 at 2:51 AM Alexander Leidinger 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 >=3D 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 (=3D 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=3D1000 (amd64) =E2=80=94 much better than 10-20ms.) However, I'm concer= ned 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