From owner-freebsd-emulation@FreeBSD.ORG Thu Apr 23 22:09:59 2009 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0276E1065670 for ; Thu, 23 Apr 2009 22:09:59 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: from smtp.kn-bremen.de (gelbbaer.kn-bremen.de [78.46.108.116]) by mx1.freebsd.org (Postfix) with ESMTP id 84D5C8FC19 for ; Thu, 23 Apr 2009 22:09:57 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id 510591E000F2; Fri, 24 Apr 2009 00:10:39 +0200 (CEST) Received: from triton.kn-bremen.de (noident@localhost [127.0.0.1]) by triton.kn-bremen.de (8.14.3/8.14.3) with ESMTP id n3NLl2HK083652; Thu, 23 Apr 2009 23:47:02 +0200 (CEST) (envelope-from nox@triton.kn-bremen.de) Received: (from nox@localhost) by triton.kn-bremen.de (8.14.3/8.14.3/Submit) id n3NLl2do083651; Thu, 23 Apr 2009 23:47:02 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Thu, 23 Apr 2009 23:47:01 +0200 To: freebsd-emulation@freebsd.org Message-ID: <20090423214701.GA83621@triton.kn-bremen.de> References: <200904032223.n33MNTiq019599@triton.kn-bremen.de> <200904072137.n37LbbdC071227@triton.kn-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200904072137.n37LbbdC071227@triton.kn-bremen.de> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: kalinoj1@iem.pw.edu.pl Subject: Re: Recent qemu and timers issue X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2009 22:09:59 -0000 On Tue, Apr 07, 2009 at 11:37:37PM +0200, Juergen Lock wrote: > In article <200904062254.37824.kalinoj1@iem.pw.edu.pl> you write: > >Dnia sobota 04 kwietnia 2009 o 00:23:29 Juergen Lock napisa=C5=82(a): > >> In article you write: > >> >Hi all, > >> > > >> >When running FreeBSD 8-CURRENT system inside a qemu machine (from the > >> >latest port by nox@freebsd.org) I have strange timer problems in the > >> >virtual machine. > >> > >> What is the host running, also current? > > > >Yes, the host is also running current.=20 > > > >But the same host has no problem with older FreeBSD kernels on the guest, e= > >g.=20 > >=46reeSBIe 1.1 or FreeNAS (kernel v.6.4) > > > OK I did some tests in the meantime on my newest box that has 4 cpus and > is running 7-stable: (host) > >> > >> >My logs and console are full of messages like this: > >> >calcru: runtime went backwards from 11248014678717988 usec to 119242 usec > >> >for pid 60 (ps) > >> > > >> >calcru: runtime went backwards from 11248014678921829 usec to 2516605 us= > >ec > >> >for pid 60 (ps) > >> >calcru: runtime went backwards from 7014844 usec to 6270851 usec for pid= > > 0 > >> >(kernel) > >> > > >> >It even happens for some processes to die inside qemu guest. > >> > >> Is this an smp host? You could try forcing qemu onto one cpu by > >> doing like: > >> cpuset -l 0 qemu ... > >> > > > >Yes, it's an smp host (8 cpus). But cpuset -l 0 qemu ... (also -clock=20 > >dynticks) didnt't help. > > > Same here with an 8.0-HEAD-20090403-JPSNAP-i386 guest. (OK I didn't see > guest processes die, but I also didn't really load the guests so far...) > > A 7.1-RELENG_7-20090403-JPSNAP-i386 guest was not affected. > > >> >I tried to use all possible timers using sysctl, where I have: > >> >TSC(800) HPET(900) ACPI-safe(850) i8254(0) dummy(-1000000) > >> >None of these helped. > >> > >> On the host or in the guest? > >> > > > >It's in the guest machine., where I tried these settings=20 > > > >One important thing I forgot to mention in my initial posting: > >When I run 'systat -vm 1' o the guest machine - it's almost fully loaded - = > >and=20 > >80% (or more) of it's cpu time is spent in interrrupt handling! This is als= > >o=20 > >not the case with older kernels. > > > Hmm 'systat -vm 1' doesn't really load the 8.0 guest here. > > >> [snip] > >> >I would greatly appreciate any help or a hint - where should I look for > >> >help on this issue. > >> > >> If none of these help you could also try the qemu list: > >> http://lists.nongnu.org/mailman/listinfo/qemu-devel > >> (I think you can still post without being subscribed, altho in that case > >> it may take a while for the post to get thru.) > >> > >> HTH, > >> Juergen > > > >At this moment it's very hard for me to judge if it's qemu or kernel issue.. > >Any thoughts? > > Yeah, could be one or the other. I just noticed running any FreeBSD guest with bootverbose (boot -v, or menu item 5 in the default beastie menu) gives me lots of these: t_delta 16.0109662fcd2712a0 too long t_delta 16.014a1099ee815ca0 too long t_delta 16.0108d9c2ecd404c0 too long t_delta 16.0108d032cb334b60 too long t_delta 15.f58306afb53419a0 too short t_delta 16.010a762538a38680 too long etc. My guess is this could be related... Juergen