Date: Wed, 13 Jun 2007 00:18:13 +0400 (MSD) From: Dmitry Morozovsky <marck@rinet.ru> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: freebsd-stable@freebsd.org, Ivan Voras <ivoras@fer.hr> Subject: Re: calcru: runtime went backwards, RELENG_6, SMP Message-ID: <20070613001723.F49954@woozle.rinet.ru> In-Reply-To: <200706121823.l5CIN8RN063247@apollo.backplane.com> References: <20070606153542.Y76617@woozle.rinet.ru> <f46tmc$rgb$2@sea.gmane.org> <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>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <rdtsc> 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 *** ------------------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070613001723.F49954>