From owner-freebsd-stable@FreeBSD.ORG Tue Jun 12 20:18:18 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 ACECE16A46B for ; Tue, 12 Jun 2007 20:18:18 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id 2FAE613C4BB for ; Tue, 12 Jun 2007 20:18:17 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.1/8.14.1) with ESMTP id l5CKIDdi051285; Wed, 13 Jun 2007 00:18:13 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Wed, 13 Jun 2007 00:18:13 +0400 (MSD) From: Dmitry Morozovsky To: Matthew Dillon In-Reply-To: <200706121823.l5CIN8RN063247@apollo.backplane.com> Message-ID: <20070613001723.F49954@woozle.rinet.ru> 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> <200706121823.l5CIN8RN063247@apollo.backplane.com> X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (woozle.rinet.ru [0.0.0.0]); Wed, 13 Jun 2007 00:18:13 +0400 (MSD) 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 20:18:18 -0000 On Tue, 12 Jun 2007, Matthew Dillon wrote: MD> :s,/kernel,/boot/kernel/kernel, ;-) MD> : MD> :well, strange enough result for me: MD> : MD> :(kgdb) print cpu_ticks MD> :$1 = (cpu_tick_f *) 0xffffffff8036cef0 MD> : MD> :Does this mean that kernel uses tsc? sysctl reports MD> : MD> :kern.timecounter.choice: TSC(-100) ACPI-fast(1000) i8254(0) dummy(-1000000) MD> :kern.timecounter.hardware: ACPI-fast MD> MD> It means the kernel is using the TSC for calcru. It's using ACPI-fast MD> for normal timekeeping. MD> MD> In anycase, that's the problem right there, or at least one problem. MD> The TSC cannot safely be used for calcru or much of anything else on MD> a SMP system because the TSCs aren't synchronized between cpu's and MD> because their frequencies aren't locked, so they will drift relative MD> to each other as well. MD> MD> If you want to run another test, try disabling the use of the TSC for MD> calcru. There is no boot variable I can see to do it so go into MD> /usr/src/sys/i386/i386/tsc.c and comment out the call to MD> set_cputicker() in Line 107 and line 187. Then see if that helps. MD> If you are doing an amd64 build comment it out in amd64/amd64/tsc.c MD> line 98 and line 163. Not much success (amd64 with two set_cputicker calls commented out): Trying to mount root from ufs:/dev/ad4s1b Loading configuration files. No suitable dumpkernel trap 12 with interrupts disabled Fatal trap 12: page fault while in kernel mode cpuid = 1; apic id = 01 fault virtual address = 0x140 fault code = supervisor write data, page not present instruction pointer = 0x8:0xffffffff803528a8 stack pointer = 0x10:0xffffffffa02c2a00 frame pointer = 0x10:0xffffffffa02c2a40 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = resume, IOPL = 0 current process = 43 (sh) [thread pid 43 tid 100033 ] Stopped at cpu_throw+0x18: lock btrl %eax,0x140(%rdx) db> bt Tracing pid 43 tid 100033 td 0xffffff003da9d9c0 cpu_throw() at cpu_throw+0x18 thread_exit() at thread_exit+0x31d exit1() at exit1+0xb13 sys_exit() at sys_exit+0xe syscall() at syscall+0x254 Xfast_syscall() at Xfast_syscall+0xab --- syscall (1, FreeBSD ELF64, sys_exit), rip = 0x800930f6c, rsp = 0x7fffffffe388, rbp = 0x800b110b5 --- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------