From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRFUU-0002D6-BR for qemu-devel@nongnu.org; Mon, 17 Aug 2015 04:09:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZRFUQ-0008Eg-Q9 for qemu-devel@nongnu.org; Mon, 17 Aug 2015 04:09:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35798) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRFUQ-0008D8-LJ for qemu-devel@nongnu.org; Mon, 17 Aug 2015 04:09:54 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id C2F3B9D77D for ; Mon, 17 Aug 2015 08:09:53 +0000 (UTC) From: =?UTF-8?q?Marc=20Mar=C3=AD?= Date: Mon, 17 Aug 2015 10:09:33 +0200 Message-Id: <1439798975-2488-1-git-send-email-markmb@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 0/2] Dynamic module support for block drivers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Cc: =?UTF-8?q?Marc=20Mar=C3=AD?= The current module infrastructure has been improved to enable dynamic mod= ule loading. This reduces the load time for very simple guests. For the following configuration (very loaded) ./configure --enable-sdl --enable-gtk --enable-vte --enable-curses \ --enable-vnc --enable-vnc-{jpeg,tls,sasl,png} --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-numa \ --enable-tcmalloc --target-list=3Dx86_64-softmmu With modules disabled, there are 142 libraries loaded at startup. Time is the following: LD time: 0.065 seconds QEMU time: 0.02 seconds Total time: 0.085 seconds With this patch series and modules enabled, there are 128 libraries loade= d at startup. Time is the following: LD time: 0.02 seconds QEMU time: 0.02 seconds Total time: 0.04 seconds Where LD time is the time between the program startup and the jump to mai= n, and QEMU time is the time between the start of main and the first kvm_ent= ry. These results are just with a few block drivers, that were already a modu= le. Adding more modules (block or not block) should be easy, and will reduce the load time even more. Marc Mar=C3=AD (2): Add dynamic module loading for block drivers Add dynamic generation of module_block.h .gitignore | 1 + Makefile | 10 ++- block.c | 73 +++++++++++++++++++++- configure | 2 +- include/qemu/module.h | 3 + include/qemu/module_block.h | 89 +++++++++++++++++++++++++++ scripts/modules/module_block.py | 132 ++++++++++++++++++++++++++++++++++= ++++++ util/module.c | 38 ++++-------- 8 files changed, 314 insertions(+), 34 deletions(-) create mode 100644 include/qemu/module_block.h create mode 100755 scripts/modules/module_block.py --=20 2.4.3