Skip to contentSkip to conversation

Memory, TCG, NBD, build system changes for 2015-04-27

GIT PULL Applied Paolo Bonzini 2 participants 3 messages Apr 29, 2015 – Apr 30, 2015

lore
Share & tools
lore
#0 lore raw

The following changes since commit e1a5476354d396773e4c555f126d752d4ae58fa9:

Open 2.4 development tree (2015-04-25 22:05:07 +0100)

are available in the git repository at:

git://github.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to d064d9f381b00538e41f14104b88a1ae85d78865:

nbd/trivial: fix type cast for ioctl (2015-04-28 22:14:15 +0200)

----------------------------------------------------------------
- miscellaneous cleanups for TCG (Emilio) and NBD (Bogdan)
- next part in the thread-safe address_space_* saga: atomic access to the bounce buffer and the map_clients list, from Fam
- optional support for linking with tcmalloc, also from Fam
- reapplying Peter Crosthwaite's "Respect as_translate_internal length clamp" after fixing the SPARC fallout.
- build system fix from Wei Liu
- small acpi-build and ioport cleanup by myself

----------------------------------------------------------------
Bogdan Purcareata (1):
nbd/trivial: fix type cast for ioctl

Emilio G. Cota (2):
translate-all: use glib for all page descriptor allocations
translate-all: use bitmap helpers for PageDesc's bitmap

Fam Zheng (6):
exec: Atomic access to bounce buffer
linux-user, bsd-user: Remove two calls to cpu_exec_init_all
exec: Protect map_client_list with mutex
exec: Notify cpu_register_map_client caller if the bounce buffer is available
dma-helpers: Fix race condition of continue_after_map_failure and dma_aio_cancel
configure: Add support for tcmalloc

Mark Cave-Ayland (1):
sun4m: fix slavio sysctrl and led register sizes

Nadav Amit (1):
target-i386: disable LINT0 after reset

Paolo Bonzini (9):
memory: add memory_region_ram_resize
acpi-build: remove dependency from ram_addr.h
sb16: remove useless mixer_write_indexw
gus: clean up MemoryRegionPortio
ide: there is only one data port
ioport: remove wrong comment
ioport: loosen assertions on emulation of 16-bit ports
ioport: reserve the whole range of an I/O port in the AddressSpace
milkymist: do not modify libs-softmmu

Peter Crosthwaite (1):
exec: Respect as_translate_internal length clamp

Wei Liu (1):
Makefile.target: prepend $libs_softmmu to $LIBS

 Makefile.target           |  2 +-
 bsd-user/main.c           |  1 -
 configure                 | 24 ++++++++++++++
 dma-helpers.c             | 17 +++++-----
 exec.c                    | 81 +++++++++++++++++++++++++++++------------------
 hw/audio/gus.c            | 20 +-----------
 hw/audio/sb16.c           |  7 ----
 hw/core/loader.c          |  8 ++---
 hw/display/Makefile.objs  |  2 +-
 hw/i386/acpi-build.c      | 36 ++++++++++-----------
 hw/ide/core.c             |  4 +--
 hw/intc/apic_common.c     |  9 ------
 hw/misc/slavio_misc.c     |  5 +--
 include/exec/cpu-common.h |  3 +-
 include/exec/memory.h     | 12 +++++++
 include/hw/loader.h       |  8 +++--
 ioport.c                  | 30 ++++++++++--------
 linux-user/main.c         |  1 -
 memory.c                  |  7 ++++
 nbd.c                     |  2 +-
 translate-all.c           | 60 +++++++----------------------------
 21 files changed, 168 insertions(+), 171 deletions(-)
Signature · 1 line
2.3.5
#1 lore raw

[Qemu-devel] [PULL v2 17/22] configure: Add support for tcmalloc

From: Fam Zheng <[email protected]>

This adds "--enable-tcmalloc" and "--disable-tcmalloc" to allow linking to libtcmalloc from gperftools.

tcmalloc is a malloc implementation that works well with threads and is fast, so it is good for performance.

It is disabled by default, because the MALLOC_PERTURB_ flag we use in tests doesn't work with tcmalloc. However we can enable tcmalloc specific heap checker and profilers later.

An IOPS gain can be observed with virtio-blk-dataplane, other parts of QEMU will directly benefit from it as well:

==========================================================
glibc malloc
----------------------------------------------------------

rw         bs         iodepth    bw     iops       latency
read       4k         1          150    38511      24

----------------------------------------------------------

==========================================================
tcmalloc
----------------------------------------------------------

rw         bs         iodepth    bw     iops       latency
read       4k         1          156    39969      23

----------------------------------------------------------

Message-Id: <[email protected]>

---
 configure | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
configure +24 -0
index 6969f6f..75a4def 100755
@@ -336,6 +336,7 @@ libssh2=""
 vhdx=""
 quorum=""
 numa=""
+tcmalloc="no"
 
 # parse CC options first
 for opt do
@@ -1134,6 +1135,10 @@ for opt do
   ;;
   --enable-numa) numa="yes"
   ;;
+  --disable-tcmalloc) tcmalloc="no"
+  ;;
+  --enable-tcmalloc) tcmalloc="yes"
+  ;;
   *)
       echo "ERROR: unknown option $opt"
       echo "Try '$0 --help' for more information"
@@ -1407,6 +1412,8 @@ Advanced options (experts only):
   --enable-quorum          enable quorum block filter support
   --disable-numa           disable libnuma support
   --enable-numa            enable libnuma support
+  --disable-tcmalloc       disable tcmalloc support
+  --enable-tcmalloc        enable tcmalloc support
 
 NOTE: The object files are built at the place where configure is launched
 EOF
@@ -3331,6 +3338,22 @@ EOF
 fi
 
 ##########################################
+# tcmalloc probe
+
+if test "$tcmalloc" = "yes" ; then
+  cat > $TMPC << EOF
+#include <stdlib.h>
+int main(void) { malloc(1); return 0; }
+EOF
+
+  if compile_prog "" "-ltcmalloc" ; then
+    LIBS="-ltcmalloc $LIBS"
+  else
+    feature_not_found "tcmalloc" "install gperftools devel"
+  fi
+fi
+
+##########################################
 # signalfd probe
 signalfd="no"
 cat > $TMPC << EOF
@@ -4441,6 +4464,7 @@ echo "lzo support       $lzo"
 echo "snappy support    $snappy"
 echo "bzip2 support     $bzip2"
 echo "NUMA host support $numa"
+echo "tcmalloc support  $tcmalloc"
 
 if test "$sdl_too_old" = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
Signature · 1 line
2.3.5
#2 lore raw
In reply to Paolo Bonzini
Quoted 22 lines · Paolo Bonzini

The following changes since commit e1a5476354d396773e4c555f126d752d4ae58fa9:

Open 2.4 development tree (2015-04-25 22:05:07 +0100)

are available in the git repository at:

git://github.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to d064d9f381b00538e41f14104b88a1ae85d78865:

nbd/trivial: fix type cast for ioctl (2015-04-28 22:14:15 +0200)

----------------------------------------------------------------
- miscellaneous cleanups for TCG (Emilio) and NBD (Bogdan)
- next part in the thread-safe address_space_* saga: atomic access to the bounce buffer and the map_clients list, from Fam
- optional support for linking with tcmalloc, also from Fam
- reapplying Peter Crosthwaite's "Respect as_translate_internal length clamp" after fixing the SPARC fallout.
- build system fix from Wei Liu
- small acpi-build and ioport cleanup by myself

Quoted 1 line

----------------------------------------------------------------

Applied, thanks.

-- PMM