Date: Thu, 3 Oct 2019 01:23:10 -0700 From: Mark Millard <marklmi@yahoo.com> To: freebsd-hackers@freebsd.org, Konstantin Belousov <kostikbel@gmail.com> Subject: Re: Why is tc_get_timecount() called two times in tc_init()? Message-ID: <B817624A-B0D1-4914-A3DE-55ED5634338F@yahoo.com>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B817624A-B0D1-4914-A3DE-55ED5634338F>