Date: Sat, 26 Mar 2011 15:00:26 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Peter Jeremy <peterjeremy@acm.org> Cc: freebsd-hackers@freebsd.org, Jing Huang <jing.huang.pku@gmail.com> Subject: Re: [GSoc] Timeconter Performance Improvements Message-ID: <20110326130026.GZ78089@deviant.kiev.zoral.com.ua> In-Reply-To: <20110326121646.GA2367@server.vk2pj.dyndns.org> References: <AANLkTimbBohQmoPv19Qq2U6M70OBx%2BFBMiUAzQmqrTLK@mail.gmail.com> <201103250818.38470.jhb@freebsd.org> <20110326121646.GA2367@server.vk2pj.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--EZkH4bgFGiJLZO53 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 26, 2011 at 11:16:46PM +1100, Peter Jeremy wrote: > On 2011-Mar-25 08:18:38 -0400, John Baldwin <jhb@freebsd.org> wrote: > >For modern Intel CPUs you can just assume that the TSCs are in sync acro= ss=20 > >packages. They also have invariant TSC's meaning that the frequency doe= sn't=20 > >change. >=20 > Synchronised P-state invariant TSCs vastly simplify the problem but > not everyone has them. Should the fallback be more complexity to > support per-CPU TSC counts and varying frequencies or a fallback to > reading the time via a syscall? >=20 > >I believe we already have a shared page (it holds the signal trampoline = now) > >for at least the x86 platform (probably some others as well). >=20 > r217151 for amd64 and r217400 for ppc. It doesn't appear to be > supported on other platforms. My reading of the code is that there is > a single shared page used by all processes/CPUs. In order to support > non-synchronised TSCs, this would need to be changed to per-CPU. Not neccessary. If you have a reliable way to access proper private per-CPU page from the array, then you could use the same method to access the array in the single page. IMO, per-cpu page in process address space at the same address for all pages is too costly. I think we can target a modern hardware for user-mode tsc, this is the kind of machines that are used for benchmarks anyway. --EZkH4bgFGiJLZO53 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk2N42oACgkQC3+MBN1Mb4jC2gCfRfzQhjGNHLdqO78Wf+NJmz45 PRQAoNqIrLjQ7fWoVR6EeXy5aspj4GZr =BdhB -----END PGP SIGNATURE----- --EZkH4bgFGiJLZO53--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110326130026.GZ78089>