From owner-freebsd-current@FreeBSD.ORG Fri Jul 16 20:47:30 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEA1010656E7 for ; Fri, 16 Jul 2010 20:47:29 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6993C8FC1C for ; Fri, 16 Jul 2010 20:47:28 +0000 (UTC) Received: by fxm13 with SMTP id 13so1482131fxm.13 for ; Fri, 16 Jul 2010 13:47:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=E5rno1n0oQFmgj2ovHBQZ4zBwBuEIZ4AYbBKIsMyHrI=; b=fm8jeQs/iDmEJvOTLTAFCivrFazfoF+Juzy5C/rrE+opI7g43X1Uy2l0aswHrxnRmg w0A2sFtuto/f2L86Q0jSN3GuzE87eWVuUAYCvOEVVLL1hdYt+xKRJAJ23gKIK10cRXjM RQqLi3FNjcSi0VOKz2EnbCXKGEmNgPNS3N9Sg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=PCJ0ZFvngDEd9R6tH0G6h5oecBfYTqPWeqplwRF11biBQ4sYszRJuTu4pfKUQN5BAe 95EYDNX44GnM+IvUSIfaFL+8KKe2WWPJbz9ROT8XYBCQNjUz0OByk6pLCZDAIpVjYsje A06EuO2NLFGi4xJ1RV5nKyO1UbDlwvXgpWCvA= Received: by 10.223.119.133 with SMTP id z5mr1118755faq.62.1279313248132; Fri, 16 Jul 2010 13:47:28 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id y2sm894858fau.36.2010.07.16.13.47.26 (version=SSLv3 cipher=RC4-MD5); Fri, 16 Jul 2010 13:47:27 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C40C55B.8040508@FreeBSD.org> Date: Fri, 16 Jul 2010 23:47:23 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: Rob Farmer References: <4C3FFD3F.7060909@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: current Subject: Re: Clock not moving in virtual machine X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 20:47:30 -0000 Rob Farmer wrote: >>> @@ -81,7 +81,10 @@ >>> ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode >>> ppc0: [ITHREAD] >>> ppbus0: on ppc0 >>> -atrtc0: at port 0x70 irq 8 on isa0 >>> +atrtc0: at port 0x70 irq 8 on isa0 >>> +atrtc0: [FILTER] >>> +Event timer "RTC" frequency 32768 Hz quality 0 >>> +Starting kernel event timers: LAPIC @ 200Hz, RTC @ 128Hz >>> Timecounters tick every 5.000 msec >> Everything seems reasonable there. Try to collect more information: >> sysctl kern.timecounter >> sysctl kern.eventtimer >> vmstat -ia >> systat -vm 1 (presence and frequencies of interrupts) >> >> It could be a bug in emulation of some timers or bug in respective timer >> driver, which was not triggered before last changes. You may try switch >> to different timecounter by setting kern.timecounter.hardware, or >> different eventtimers by setting kern.eventtimer.timer1 and >> kern.eventtimer.timer2 sysctls. > > This is all on the new (not-working) kernel in single user mode: > > # sysctl kern.timecounter > kern.timecounter.tick: 1 > kern.timecounter.choice: TSC(-100) dummy(-1000000) > kern.timecounter.hardware: dummy > kern.timecounter.stepwarnings: 0 > kern.timecounter.tc.TSC.mask: 4294967295 > kern.timecounter.tc.TSC.counter: 205772785 > kern.timecounter.tc.TSC.frequency: 2261052646 > kern.timecounter.tc.TSC.quality: -100 > kern.timecounter.smp_tsc: 0 > kern.timecounter.invariant_tsc: 1 > > kern.timecounter.tc.TSC.counter changes everytime (205772785, > 3200717147, 1205899870, ...) but I can't see any pattern. It is probably hard to see pattern due to to very high clock frequency. But TSC timecounter is unreliable even on real SMP systems. What it counts on virtual SMP - even bigger question. As system seems never uses timecounters with negative quality - you've left with kern.timecounter.hardware=dummy - that's why time is not going. As last resort you may try to set sysctl kern.timecounter.hardware=TSC in run time. Previously you were using i8254 timecounter, but now you lost it as your virtual machine PnP BIOS doesn't announce it. QEMU does the same, but instead it gives HPET which your emulator seems also doesn't. To force i8254 presence add to the /boot/device.hints lines: hint.attimer.0.at="isa" hint.attimer.0.port="0x40" hint.attimer.0.irq="0" -- Alexander Motin