From owner-dev-commits-src-main@freebsd.org Fri Jun 18 15:18:21 2021 Return-Path: Delivered-To: dev-commits-src-main@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 5A6D5647FBF; Fri, 18 Jun 2021 15:18:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G62cY22Q8z4mD9; Fri, 18 Jun 2021 15:18:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id B745B2CAE5; Fri, 18 Jun 2021 15:18:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 4c0bc591466f - main - man9: add hz(9) and hardclock(9) To: Warner Losh , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202106181443.15IEhn4t010735@gitrepo.freebsd.org> From: John Baldwin Message-ID: <10df4ab6-bee0-58f5-7d42-92850d526e01@FreeBSD.org> Date: Fri, 18 Jun 2021 08:18:19 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <202106181443.15IEhn4t010735@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jun 2021 15:18:21 -0000 On 6/18/21 7:43 AM, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=4c0bc591466fd2731ba892269260b7dab74cfbad > > commit 4c0bc591466fd2731ba892269260b7dab74cfbad > Author: Warner Losh > AuthorDate: 2021-06-18 14:39:42 +0000 > Commit: Warner Losh > CommitDate: 2021-06-18 14:42:51 +0000 > > man9: add hz(9) and hardclock(9) > > Document aspects of system time keeping. Hz is the nominal rate that we > interrupt the system and is known and the 'tick' period of 1 / hz. > hardclock is the routine that does various bits of timekeeping. stathz > and profhz are documented as historical relics that are deprecated > and replaced by hwpmc.4 and others. > > Reviewed by: phk@, mav@ and gnn@ (previous version) > Obtained from: hardclock.9 from NetBSD (with FreeBSD adjustments) > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D30802 The comments about stathz are wrong. While profhz is obsolete and replaced by hwpmc, statclock is not. statclock is used to implement getrusage(), %CPU in ps(1), and kern.cp_time (global and per-CPU stats for CPU usage breakdown you see in top(1) for example). hwpmc doesn't replace any of those. OTOH, it's also true that there's no real reason for anything outside of the actual timer code to use stathz (or even profhz) unlike 'hz' which is still used to set timeout tick values. -- John Baldwin