From owner-freebsd-hackers@freebsd.org Thu Oct 3 08:23:18 2019 Return-Path: Delivered-To: freebsd-hackers@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 979C812DA81 for ; Thu, 3 Oct 2019 08:23:18 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-19.consmr.mail.gq1.yahoo.com (sonic306-19.consmr.mail.gq1.yahoo.com [98.137.68.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46kQxd2d09z3JQM for ; Thu, 3 Oct 2019 08:23:17 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: tyZeIOAVM1m0P2hYq9NDcwavr08r77QFrv5pyne3f7r0FE_wvMMD8HSZFuM7nWv fF2CoAdtf3l4cWjmM95NfxxxspxyVF3IlFfuEd8Usq0zVP2ZkUSy3YSeLkhB4yVKRB93fpBka5kK GF98jFRCf5hdlZNlbR.t6XquRRmwVVvrTt_ZSwiX1x3iVMtKDwg0zIEt6TC276ljdDcZaKRkUurX NsUtQlBkBTCD1P486NHRW4e9tmLwdrLgh5v9lLCQsIiH9BSKU_0y1g_ad7bk_pwxKQEkGtmCIdN2 Kq3Si7Kb_47uqm0pp_ofecSev.qkJntvQ_nsb_rELYRt3c6Fkod6e.8B7iDql_VTc1IbQYfTBfKy EuNo3byGqE05SybepAtHwz_OgzLh15QrVl.QZX0D95b7BuQJdEiBNbaOeC61vrAM0Iskhnax0LFq GmWHlRVXGX4PlZdQQETOvLeKSZcAkJx2ZlTbGuU5Xa422oSPH5JPCqY.IG4mWUGoCBUXHeqY_TNh 08pby5lsuiCYMGxWYwtHhv2o1ir1K4ARnvtQWZXI1yK1GF5o9hbd3RrD7lsY6_TJ61.V5rF8VABf J9hUIozAqchiX.MA0G_ah8p9_XLfGErbUHxudZ.uUoBsE_q4W7vQ5nJxgJzpk5R9AHF7Rmq1GcOo JhtwkMhlpmoLK0IYtANrYDWGOf91PA9_ok5mUIn97ZNzTToP.KdLHlXXPR91l1.7.knRcv.vMZy2 yk0R9rtvrWmGzfrN5udgY9C2PUtndZCiSt.72RySjunXefh5ncBax6brPFqD0h6AeHfAFRIgM.7x 8hKqnJprfmZg1m4lth2wos.l6SN5bFrDgAJveZh_LcYlSUsQrTfDWx2J33mDtFKGteSEcwJKZpMj C7GovwejKKOV9LClVNi1AqCfZUtcxbe6s_ebl.AhQMA5OnhUV_NO8j3bCM10qKsbpEEyb1pXz.2a yNCF2_R1zqaXorqgRJcf5ZhO1DmCfT9mYEspylk8W0b9u2_aBDwuzb9q.ACpORQL_VdWUrkEYa_j 6KI._IKJoEhp5Mw0.V3sehG4P.sUNmSQ_kcrZArE2ppr67tgt76a.oRyG9uPs4U0.jXLRoDP8_Wu unACc3rtECqBVpui562f36vsT9mW472CZktON8g5b7oRlhA3ItbVy1MiVMU.KIFTTqh9yHOBXseK S_XHWhNDlpvNRFaASJuNeLhil_o0T7o2Vfd9vAVlsS_U9iP31E6VmMDOfpVXrELufWcG0_GhbKfa 5Gm1WXWWGizyO9y3bDp8pceJ3Imb9wbGHAbTIuxznHE6FAey1JK0Xlm0Ror1JHaDxmWk2Hkbs9c5 _ Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.gq1.yahoo.com with HTTP; Thu, 3 Oct 2019 08:23:12 +0000 Received: by smtp418.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 573bfdeb1999dd393bb232fb53237c2b; Thu, 03 Oct 2019 08:23:10 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Why is tc_get_timecount() called two times in tc_init()? Message-Id: Date: Thu, 3 Oct 2019 01:23:10 -0700 To: freebsd-hackers@freebsd.org, Konstantin Belousov X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 46kQxd2d09z3JQM X-Spamd-Bar: +++ X-Spamd-Result: default: False [3.34 / 15.00]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; FAKE_REPLY(1.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (6.50), ipnet: 98.137.64.0/21(0.94), asn: 36647(0.75), country: US(-0.05)]; NEURAL_SPAM_MEDIUM(0.98)[0.985,0]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.86)[0.858,0]; RCVD_IN_DNSWL_NONE(0.00)[82.68.137.98.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Oct 2019 08:23:18 -0000 Konstantin Belousov kostikbel at gmail.com wrote on Wed Oct 2 16:39:57 UTC 2019 : > On Thu, Oct 03, 2019 at 02:25:46AM +1000, Bruce Evans wrote: > > On Wed, 2 Oct 2019, Konstantin Belousov wrote: > > > > > . . . > > > > > > I think that the addition of the second tc_get_timecount() was done > > > earlier, in r95530, and there it has semi-useful comment > > > + /* Warm up new timecounter. */ > > > + (void)newtc->tc_get_timecount(newtc); > > > + (void)newtc->tc_get_timecount(newtc); > . . . > > I think it never helped much. For the TSC, the 2 calls are ordered only > > relatively each other on a single CPU. They are not ordered relative to > > memory. For the i8254, 1 call is enough. The ACPI timer does hardware > > accesses so it is in between. > So the conclusion is that the second call can be removed, am I right ? A fair amount of the material written seemed amd64/i384 specific history and I expect that this is machine independent code. So I'll explicitly ask: Can all the FreeBSD architectures currently get by without the dual (void)newtc->tc_get_timecount(newtc) ? === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)