Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jun 2007 11:23:08 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Dmitry Morozovsky <marck@rinet.ru>
Cc:        freebsd-stable@freebsd.org, Ivan Voras <ivoras@fer.hr>
Subject:   Re: calcru: runtime went backwards, RELENG_6, SMP
Message-ID:  <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>

next in thread | previous in thread | raw e-mail | index | archive | help
:s,/kernel,/boot/kernel/kernel, ;-)
:
:well, strange enough result for me:
:
:(kgdb) print cpu_ticks
:$1 = (cpu_tick_f *) 0xffffffff8036cef0 <rdtsc>
:
: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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706121823.l5CIN8RN063247>