On Mon, 3 Aug 2015 17:24:57 +0800 Fam Zheng <f...@redhat.com> wrote: > On Mon, 08/03 11:01, Marc Marí wrote: > > Some profiling: > > > > 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=x86_64-softmmu > > > > 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. > > > > 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. > > 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. > > 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? >
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