From owner-freebsd-stable@FreeBSD.ORG Tue Jun 12 18:23:12 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A51CD16A41F for ; Tue, 12 Jun 2007 18:23:12 +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 8B40113C480 for ; Tue, 12 Jun 2007 18:23:12 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.13.8/8.13.7) with ESMTP id l5CINA6T063250; Tue, 12 Jun 2007 11:23:10 -0700 (PDT) Received: (from dillon@localhost) by apollo.backplane.com (8.13.8/8.13.4/Submit) id l5CIN8RN063247; Tue, 12 Jun 2007 11:23:08 -0700 (PDT) Date: Tue, 12 Jun 2007 11:23:08 -0700 (PDT) From: Matthew Dillon Message-Id: <200706121823.l5CIN8RN063247@apollo.backplane.com> To: Dmitry Morozovsky References: <20070606153542.Y76617@woozle.rinet.ru> <20070606231940.T91939@woozle.rinet.ru> <200706062127.l56LRYTe090137@apollo.backplane.com> <20070608111809.U97287@woozle.rinet.ru> <200706090809.l5989Mkj020033@apollo.backplane.com> <20070609163329.P4850@woozle.rinet.ru> <200706091957.l59JvDWR026822@apollo.backplane.com> <20070610175748.L88437@woozle.rinet.ru> <20070610193708.W88437@woozle.rinet.ru> <200706120213.l5C2DlkO055522@apollo.backplane.com> <20070612132917.I71178@woozle.rinet.ru> Cc: freebsd-stable@freebsd.org, Ivan Voras Subject: Re: calcru: runtime went backwards, RELENG_6, SMP X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jun 2007 18:23:12 -0000 :s,/kernel,/boot/kernel/kernel, ;-) : :well, strange enough result for me: : :(kgdb) print cpu_ticks :$1 = (cpu_tick_f *) 0xffffffff8036cef0 : :Does this mean that kernel uses tsc? sysctl reports : :kern.timecounter.choice: TSC(-100) ACPI-fast(1000) i8254(0) dummy(-1000000) :kern.timecounter.hardware: ACPI-fast It means the kernel is using the TSC for calcru. It's using ACPI-fast for normal timekeeping. In anycase, that's the problem right there, or at least one problem. The TSC cannot safely be used for calcru or much of anything else on a SMP system because the TSCs aren't synchronized between cpu's and because their frequencies aren't locked, so they will drift relative to each other as well. If you want to run another test, try disabling the use of the TSC for calcru. There is no boot variable I can see to do it so go into /usr/src/sys/i386/i386/tsc.c and comment out the call to set_cputicker() in Line 107 and line 187. Then see if that helps. If you are doing an amd64 build comment it out in amd64/amd64/tsc.c line 98 and line 163. -Matt