From owner-dev-commits-src-all@freebsd.org Fri Jun 18 18:04:12 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A451E64B106; Fri, 18 Jun 2021 18:04:12 +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 4G66Hw26mCz5523; Fri, 18 Jun 2021 18:04:12 +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 15II44B7087220 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 18 Jun 2021 21:04:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 15II44B7087220 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 15II44xA087219; Fri, 18 Jun 2021 21:04:04 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 18 Jun 2021 21:04:04 +0300 From: Konstantin Belousov To: Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 4c0bc591466f - main - man9: add hz(9) and hardclock(9) Message-ID: References: <202106181443.15IEhn4t010735@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202106181443.15IEhn4t010735@gitrepo.freebsd.org> 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: 4G66Hw26mCz5523 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jun 2021 18:04:12 -0000 On Fri, Jun 18, 2021 at 02:43:49PM +0000, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=4c0bc591466fd2731ba892269260b7dab74cfbad > +.Sh DESCRIPTION > +The > +.Fn hardclock > +function is called > +.Xr hz 9 > +times per second. This is not true, I believe. > +It implements the real-time system clock. > +The argument > +.Va cnt > +is the estimated number of ticks since the last call to > +.Fn hardclock . This is more accurate. > +The argument > +.Va usermode > +is none-zero when > +.Fn hardclock > +is called from a user-mode context. hardclock() is never called from user-mode context, it is a kernel function. Perhaps you mean to say that hardclock() is executing in the context of the handler that interrupted usermode. > +Implement software > +.Xr watchdog 9 > +processing. > +.It > +Enqueue > +.Xr epoch 9 > +processing. > +.El > +.Sh SEE ALSO > +.Xr adjtime 2 , > +.Xr ntp_adjtime 2 , > +.Xr signal 3 , > +.Xr ntpd 8 , > +.Xr callout 9 , Callout processing is not handled by hardclock(). It is done directly by timer eventhandler. > +.Pp > +The main clock is used to update the system's notion of time via > +.Xr timecounters 9 > +and to pace periodic system callbacks via > +.Xr callout 9 , > +.Xr epoch 9 , > +and other methods documented in > +.Xr hardclock 9 . Again, callouts are not managed through hardclock(). > +That routine will be called approximately > +.Va hz > +times per second. And this is not true. > +.Pp > +The second clock, running at either