From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMCso-0003lo-UN for qemu-devel@nongnu.org; Mon, 03 Aug 2015 06:22:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMCsk-0008SK-UP for qemu-devel@nongnu.org; Mon, 03 Aug 2015 06:22:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48131) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMCsk-0008SB-QS for qemu-devel@nongnu.org; Mon, 03 Aug 2015 06:22:10 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 6EDD78E775 for ; Mon, 3 Aug 2015 10:22:10 +0000 (UTC) Date: Mon, 3 Aug 2015 12:22:04 +0200 From: Marc =?UTF-8?B?TWFyw60=?= Message-ID: <20150803122204.4774bb38@markmb_rh> In-Reply-To: <20150803092457.GB30561@ad.nay.redhat.com> References: <20150731174542.44862e3a@markmb_rh> <20150803030906.GA13938@ad.nay.redhat.com> <20150803095238.663a7bee@markmb_rh> <20150803082234.GA30561@ad.nay.redhat.com> <20150803110147.55ede584@markmb_rh> <20150803092457.GB30561@ad.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Modularizing QEMU RFC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: qemu-devel On Mon, 3 Aug 2015 17:24:57 +0800 Fam Zheng wrote: > On Mon, 08/03 11:01, Marc Mar=C3=AD wrote: > > Some profiling: > >=20 > > A QEMU with this configuration: > > ./configure --enable-sparse --enable-sdl --enable-gtk --enable-vte \ > > --enable-curses --enable-vnc --enable-vnc-{jpeg,tls,sasl,png,ws} \ > > --enable-virtfs --enable-brlapi --enable-curl --enable-fdt \ > > --enable-bluez --enable-kvm --enable-rdma --enable-uuid > > --enable-vde \ --enable-linux-aio --enable-cap-ng --enable-attr > > --enable-vhost-net \ --enable-vhost-scsi --enable-spice > > --enable-rbd --enable-libiscsi \ --enable-smartcard-nss > > --enable-guest-agent --enable-libusb \ --enable-usb-redir > > --enable-lzo --enable-snappy --enable-bzip2 \ --enable-seccomp > > --enable-coroutine-pool --enable-glusterfs \ --enable-tpm > > --enable-libssh2 --enable-vhdx --enable-quorum \ --enable-numa > > --enable-tcmalloc --target-list=3Dx86_64-softmmu > >=20 > > Has dependencies on 142 libraries. It takes 60 ms between the run > > and the jump to the main function, and 80 ms between the run and the > > first kvm_entry. > >=20 > > A QEMU with the same configuration and --enable-modules has > > dependencies on 125 libraries. It takes 20 ms between the run and > > the jump to the main function, and 100 ms between the run and the > > first kvm_entry. >=20 > Which means 40 ms is saved because we reduced the size and dependency > of QEMU executable, but 60 ms is the extra cost of dynamical loading. > That's a net loss. >=20 > In your --enable-modules configuration, could you try comment out > module_load body and compare again, so we know how much time is spent > in looking up and loading modules? >=20 With the module load disabled, 20 ms from run to main, and 40 ms from run to kvm_entry. Which is "the expected", from the numbers above. Marc