Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Mar 2011 16:51:20 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-hackers@freebsd.org, Jing Huang <jing.huang.pku@gmail.com>
Subject:   Re: [GSoc] Timeconter Performance Improvements
Message-ID:  <20110326145120.GC78089@deviant.kiev.zoral.com.ua>
In-Reply-To: <201103261012.32884.jhb@freebsd.org>
References:  <AANLkTimbBohQmoPv19Qq2U6M70OBx%2BFBMiUAzQmqrTLK@mail.gmail.com> <201103250818.38470.jhb@freebsd.org> <20110326121646.GA2367@server.vk2pj.dyndns.org> <201103261012.32884.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--83IWDyxC26lT0edO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Mar 26, 2011 at 10:12:32AM -0400, John Baldwin wrote:
> On Saturday, March 26, 2011 08:16:46 am 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 ac=
ross
> > >packages.  They also have invariant TSC's meaning that the frequency
> > >doesn't 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 think we should just fallback to a syscall in that case.  We will also =
need=20
> to do that if the TSC is not used as the timecounter (or always duplicate=
 the=20
> ntp_adjtime() work we do for the current timecounter for the TSC timecoun=
ter).
>=20
> Doing this easy case may give us the most bang for the buck, and it is al=
so a=20
> good first milestone.  Once that is in place we can decide what the value=
 is=20
> in extending it to support harder variations.
>=20
> One thing we do need to think about is if the shared page should just exp=
ort a
> fixed set of global data, or if it should export routines.  The latter=20
> approach is more complex, but it makes the ABI boundary between userland =
and=20
> the kernel more friendly to future changes.  I believe Linux does the lat=
ter=20
> approach?
Linux uses a so-called vdso, which is linked into the process.

I think that the efforts to implement a vdso approximately equal to the
efforts required to implement timecounters in the user mode. On the
other hand, with vdso we could properly annotate signal trampolines
with the unwind info, that is also a big win.

--83IWDyxC26lT0edO
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEARECAAYFAk2N/WgACgkQC3+MBN1Mb4iLhACgjFUKhs+u3z+ix1npeg90b/SW
5twAmwauqkkhMeWxuTktDGfKps/j86ab
=Dn/T
-----END PGP SIGNATURE-----

--83IWDyxC26lT0edO--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110326145120.GC78089>