From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1INFKk-0004Bx-0D for qemu-devel@nongnu.org; Mon, 20 Aug 2007 18:02:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1INFKi-0004Bb-Hr for qemu-devel@nongnu.org; Mon, 20 Aug 2007 18:02:49 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1INFKi-0004BY-Ay for qemu-devel@nongnu.org; Mon, 20 Aug 2007 18:02:48 -0400 Received: from comtv.ru ([217.10.32.17]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1INFKg-0004pW-JF for qemu-devel@nongnu.org; Mon, 20 Aug 2007 18:02:46 -0400 Date: Tue, 21 Aug 2007 01:55:17 +0400 (MSD) From: malc Subject: Re: [Qemu-devel] Re: [kvm-devel] [PATCH 0/4] Rework alarm timer infrastrucure - take2 In-Reply-To: <20070820212058.GA6713@dreamland.darkstar.lan> Message-ID: References: <20070817231149.544849769@gmail.com> <1187450256.13580.1.camel@squirrel> <64F9B87B6B770947A9F8391472E032160D4645F0@ehost011-8.exch011.intermedia.net> <20070818220252.GA19526@dreamland.darkstar.lan> <68676e00708190952g7d4751c2g87a6ff71dd278f71@mail.gmail.com> <46C89A8E.7040609@qumranet.com> <20070820212058.GA6713@dreamland.darkstar.lan> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kvm-devel@lists.sf.net On Mon, 20 Aug 2007, Luca Tettamanti wrote: > Il Sun, Aug 19, 2007 at 10:31:26PM +0300, Avi Kivity ha scritto: >> Luca wrote: >>> On 8/19/07, Luca Tettamanti wrote: >>> >>>> +static uint64_t qemu_next_deadline(void) { >>>> + uint64_t nearest_delta_us = ULLONG_MAX; >>>> + uint64_t vmdelta_us; >>>> >>> >>> Hum, I introduced a bug here... those vars should be signed. >>> >>> On the overhead introduced: how do you measure it? >>> >>> >> >> Run a 100Hz guest, measure cpu usage using something accurate like >> cyclesoak, with and without dynticks, with and without kvm. > > Ok, here I've measured the CPU usage on the host when running an idle > guest. > [..snip the numbers..] After briefly looking at the cyclesoak it indeed looks like it does the right thing, but considering the limitations of user-space only approach it introduces some (sometimes really unwanted) variables into the system, those can, and i guess will, influence things. The upshot is this - if you have used any standard utility (iostat, top - basically anything /proc/stat based) the accounting has a fair chance of being inaccurate. If cyclesoak is what you have used then the results should be better, but still i would be worried about them. In conclusion until kernel native accounting is fixed your best bet is to use: http://www.boblycat.org/~malc/apc/ -- vale