From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 16 23:31:56 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 244CA16A415 for ; Sat, 16 Dec 2006 23:31:56 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id B069143CC9 for ; Sat, 16 Dec 2006 23:31:50 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.13.7/8.13.4) with ESMTP id kBGNVnsB035507; Sat, 16 Dec 2006 15:31:50 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.13.7/8.13.4/Submit) id kBGNViQ9035504; Sat, 16 Dec 2006 15:31:44 -0800 (PST) Date: Sat, 16 Dec 2006 15:31:44 -0800 (PST) From: Matthew Dillon Message-Id: <200612162331.kBGNViQ9035504@apollo.backplane.com> To: "Joseph Koshy" References: <200612141437.28724.mldodson@houston.rr.com> <84dead720612150950p33c9c35erffe4adbab7227e68@mail.gmail.com> Cc: freebsd-hackers@freebsd.org, mldodson@houston.rr.com Subject: Re: "Syncing cpus" on a multi-cpu, dual core system 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: Sat, 16 Dec 2006 23:31:56 -0000 The TSCs for each individual cpu core can drift relative to each other, even on multi-core chips like AMD X2s. This only effects code which uses the TSC, which isn't a whole lot. They need to be synchronized with each other (by calculating the drift and correcting for it) when using the TSC to log events, such as KTR logging might do. Since the TSC runs off the PLL, the drift rate will change based on the temperature of each core. I'm not sure whether the LAPIC timers can be depended upon to operate from the same physical clock source or not (i.e. whether they drift relative to each other or not). I haven't tested them for that. -Matt