From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 3 16:48:46 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 678BC106566C; Fri, 3 Jun 2011 16:48:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.freebsd.org (Postfix) with ESMTP id 224AE8FC12; Fri, 3 Jun 2011 16:48:45 +0000 (UTC) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.6/8.13.6) with ESMTP id p53GTB27063451; Fri, 3 Jun 2011 12:29:13 -0400 (EDT) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Andriy Gapon Date: Fri, 3 Jun 2011 12:28:34 -0400 User-Agent: KMail/1.6.2 References: <201105241356.45543.jkim@FreeBSD.org> <201106011655.51233.jkim@FreeBSD.org> <4DE8794B.60100@FreeBSD.org> In-Reply-To: <4DE8794B.60100@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201106031228.58113.jkim@FreeBSD.org> X-Virus-Scanned: clamav-milter 0.95.3 at anuket.mj.niksun.com X-Virus-Status: Clean Cc: freebsd-hackers@FreeBSD.org Subject: Re: [RFC] Enabling invariant TSC timecounter on SMP X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2011 16:48:46 -0000 On Friday 03 June 2011 02:03 am, Andriy Gapon wrote: > on 01/06/2011 23:55 Jung-uk Kim said the following: > > Yes, it's still a work-in-progress. However, I thought it is > > good enough for 9.0 inclusion. BTW, the latest patch is here: > > > > http://people.freebsd.org/~jkim/tsc_smp_test5.diff > > > > FYI, the only meaningful change from the previous version is that > > it's limited to AMD single-socket Bulldozer platforms and Intel > > Core and later platforms. We may add more quirks if needed, of > > course. > > Looks good, but I think that the check is a little bit unfair to > AMD Family 10h+ CPUs. Although TSCs in those CPUs are per core > I've never seen them drift out of sync if they started with the > same value. [snip] Unlike Intel, AMD did not guarantee "all TSCs reset to zero with RESET IPI" before Bulldozer[1]. In fact, I tried to measure deltas between cores when I started hacking on it using some crude heuristics, somewhat like the OpenSolaris hack[2]. Basically, a dual-core AMD Family 10h processor showed noticeably larger deltas than *two* dual-core Intel Woodcrest Xeons'. Jung-uk Kim [1] I couldn't find any clues from their publicly available documents whether they will implement (or need) additional mechanism for multi-socket Bulldozer platforms. It only says something like "all TSCs are synchronized with a clock source in north bridge". We will see when AMD Valencia & Interlagos are available. :-) [2] Unfortunately, there is no way to accurately measure it with current generation hardware.