Date: Fri, 18 Jun 2021 21:04:04 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Warner Losh <imp@freebsd.org> 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: <YMzgFHMuET/Qw200@kib.kiev.ua> In-Reply-To: <202106181443.15IEhn4t010735@gitrepo.freebsd.org> References: <202106181443.15IEhn4t010735@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YMzgFHMuET/Qw200>