From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MrxmY-0004gc-VI for qemu-devel@nongnu.org; Sun, 27 Sep 2009 13:43:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MrxmV-0004gE-7W for qemu-devel@nongnu.org; Sun, 27 Sep 2009 13:43:34 -0400 Received: from [199.232.76.173] (port=59855 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MrxmV-0004gB-1e for qemu-devel@nongnu.org; Sun, 27 Sep 2009 13:43:31 -0400 Received: from fe01x03-cgp.akado.ru ([77.232.31.164]:64426 helo=akado.ru) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MrxmU-0008FA-0z for qemu-devel@nongnu.org; Sun, 27 Sep 2009 13:43:30 -0400 Received: from [10.0.66.9] ([10.0.66.9] verified) by fe01-cgp.akado.ru (CommuniGate Pro SMTP 5.2.13) with ESMTP id 113042590 for qemu-devel@nongnu.org; Sun, 27 Sep 2009 21:43:11 +0400 Date: Sun, 27 Sep 2009 21:43:14 +0400 (MSD) From: malc Subject: Re: [Qemu-devel] Main loop In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Sun, 27 Sep 2009, malc wrote: > > At http://repo.or.cz/w/qemu/malc.git?a=shortlog;h=refs/heads/mtloop you > can find the branch which refactors main execution loop somewhat, effects > include: > > a. Host alarm timers are gone > b. IO thread is replaced (now Windows is supported too) > [..snip..] And just to make things more interesting: $ git show commit 309c5a3c4c2d234c1de8e0fb9441c8754590b1ce Author: malc Date: Sun Sep 27 20:53:52 2009 +0400 Add trace points for debian-503-i386-netinst.iso tracing begins _after_ selecting Install menu entry, results: c2b023b62707f5dc73497 this one (not sure what the has would be) ---------------------- ----------------------------------------- took 9.810747 seconds took 9.352371 seconds took 17.470818 seconds took 15.257145 seconds took 36.917233 seconds took 31.720386 seconds took 39.437925 seconds took 33.894850 seconds took 56.677207 seconds took 48.580790 seconds took 71.053026 seconds took 59.385500 seconds took 89.334869 seconds took 71.016816 seconds took 102.079938 seconds took 84.707160 seconds took 108.837361 seconds took 93.934140 seconds took 114.551840 seconds took 98.579744 seconds took 120.375490 seconds took 103.829356 seconds took 126.530942 seconds took 109.003527 seconds diff --git a/vl.c b/vl.c index 34b8e72..c507fec 100644 --- a/vl.c +++ b/vl.c @@ -3142,12 +3142,17 @@ void onpc (target_ulong pc) static int done; static double a; + if (pc == 0xc036405a) { + a = now (); + done = 1; + return; + } if (!done) { done = 1; a = now (); return; } - if (pc == 0x08048054) { + if (pc == 0x08048054 || pc == 0x0804c00c) { printf ("took %f seconds\n", now () - a); } } @@ -3516,9 +3521,11 @@ static void *exec_thread_loop (void __attribute__ ((unused)) *unused) break; if (mt.wait_for_cont) { +#if 0 static struct stats s = { .name = "cont", .limit = 1000 }; smark (&s); +#endif if (sem_wait (&mt.cont_sem)) { die (errno, "exec_thread_loop: sem_wait/cont"); } [end] IO Thread results are: took 9.955913 seconds took 17.407633 seconds took 38.311728 seconds took 40.854557 seconds took 58.371600 seconds took 70.021890 seconds took 85.377891 seconds took 101.429223 seconds took 111.663570 seconds took 116.943185 seconds took 122.880269 seconds took 129.600638 seconds IOW slightly worse than non IO Thread. Caveat emptor: a. those are benchmarks b. i tend to fuck up things on occasion (frequently) So take with a grain of salt. P.S. (not sure what the has would be) should read (not sure what the _hash_ would be) -- mailto:av1474@comtv.ru