From nobody Sat Oct 09 06:43:34 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 43CC512DBAA7; Sat, 9 Oct 2021 06:43:42 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4HRFrZ09KHz3lFb; Sat, 9 Oct 2021 06:43:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 1996hY2x013488 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 9 Oct 2021 09:43:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 1996hY2x013488 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 1996hYqx013487; Sat, 9 Oct 2021 09:43:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 9 Oct 2021 09:43:34 +0300 From: Konstantin Belousov To: "Piotr P. Stefaniak" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: bf8f6ffcb66a - main - Mention kern.timecounter.alloweddeviation in nanosleep.1 Message-ID: References: <202110081509.198F94HG022514@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4HRFrZ09KHz3lFb X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Sat, Oct 09, 2021 at 06:18:48AM +0000, Piotr P. Stefaniak wrote: > On 2021-10-09 08:53:08, Konstantin Belousov wrote: > > On Fri, Oct 08, 2021 at 03:09:04PM +0000, Piotr Pawel Stefaniak wrote: > > > @@ -93,6 +93,8 @@ returns immediately and the calling thread is not suspended. > > > .Pp > > > The suspension time may be longer than requested due to the > > > scheduling of other activity by the system. > > > +It is also subject to the allowed time interval deviation > > > +specified by the sysctl kern.timecounter.alloweddeviation. > > This should be like > > .Xr sysctl 3 > > .Dv kern.timecounter.alloweddeviation > > @@ -94,7 +94,9 @@ returns immediately and the calling thread is not suspended. > The suspension time may be longer than requested due to the > scheduling of other activity by the system. > It is also subject to the allowed time interval deviation > -specified by the sysctl kern.timecounter.alloweddeviation. > +specified by the > +.Xr sysctl 3 > +.Dv kern.timecounter.alloweddeviation . > An unmasked signal will terminate the sleep early, regardless of the > .Dv SA_RESTART > value on the interrupting signal. > > > And then, it is missing a description what exactly is allowed by deviation, > > for instance, what units this sysctl is? > > That would be redundant with sysctl -d. The point of this change is that now > the user is much more likely to know of the sysctl and can look it up and read > all about it. > sysctl -d is not a (good) documentation. When you read a man text, you are supposed to get everything that is relevant there, although it might be terse and requiring making logical deduction. This is not the case there. Anyway, I went ahead and did what you suggested. On one of my machines, I got solo% sysctl -d kern.timecounter.alloweddeviation kern.timecounter.alloweddeviation: solo% On another, v1% sysctl -d kern.timecounter.alloweddeviation ~ kern.timecounter.alloweddeviation: Allowed time interval deviation in percents Slightly more useful, but still. Percents of what? Imagine somebody reads the man page in the browser from Linux. Where should he search for the sysctl description? > The bug may be that there isn't much documentation to be read about it, only > sysctl -d and kern_tc.c. > > The only thing I worry that may be missing from this change is this reference > in any other manual pages that might need it as much as nanosleep. Well, nanosleep is just an example of a syscall requesting timeout. Another poster childs there are select(2), and poll(2) family which explicitly use precision. To get the definitive list, you would need to review all uses of callout_reset() variants.