Date: Sat, 26 Mar 2011 10:12:32 -0400 From: John Baldwin <jhb@freebsd.org> 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: <201103261012.32884.jhb@freebsd.org> 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
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 across > >packages. They also have invariant TSC's meaning that the frequency > >doesn't change. > > 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? I think we should just fallback to a syscall in that case. We will also need to do that if the TSC is not used as the timecounter (or always duplicate the ntp_adjtime() work we do for the current timecounter for the TSC timecounter). Doing this easy case may give us the most bang for the buck, and it is also a good first milestone. Once that is in place we can decide what the value is in extending it to support harder variations. One thing we do need to think about is if the shared page should just export a fixed set of global data, or if it should export routines. The latter approach is more complex, but it makes the ABI boundary between userland and the kernel more friendly to future changes. I believe Linux does the latter approach? -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103261012.32884.jhb>