Skip to content
ChangeLog 71.1 KiB
Newer Older
Jason Evans's avatar
Jason Evans committed
Following are change highlights associated with official releases.  Important
Jason Evans's avatar
Jason Evans committed
bug fixes are all mentioned, but some internal enhancements are omitted here for
brevity.  Much more detail can be found in the git revision history:
Jason Evans's avatar
Jason Evans committed

Jason Evans's avatar
Jason Evans committed
    https://github.com/jemalloc/jemalloc

Qi Wang's avatar
Qi Wang committed
* 5.2.0 (April 2, 2019)

  This release includes a few notable improvements, which are summarized below:
  1) improved fast-path performance from the optimizations by @djwatson; 2)
  reduced virtual memory fragmentation and metadata usage; and 3) bug fixes on
  setting the number of background threads.  In addition, peak / spike memory
  usage is improved with certain allocation patterns.  As usual, the release and
  prior dev versions have gone through large-scale production testing.

  New features:
  - Implement oversize_threshold, which uses a dedicated arena for allocations
    crossing the specified threshold to reduce fragmentation.  (@interwq)
  - Add extents usage information to stats.  (@tyleretzel)
  - Log time information for sampled allocations.  (@tyleretzel)
  - Support 0 size in sdallocx.  (@djwatson)
  - Output rate for certain counters in malloc_stats.  (@zinoale)
  - Add configure option --enable-readlinkat, which allows the use of readlinkat
    over readlink.  (@davidtgoldblatt)
  - Add configure options --{enable,disable}-{static,shared} to allow not
    building unwanted libraries.  (@Ericson2314)
  - Add configure option --disable-libdl to enable fully static builds.
    (@interwq)
  - Add mallctl interfaces:
	+ opt.oversize_threshold (@interwq)
	+ stats.arenas.<i>.extent_avail (@tyleretzel)
	+ stats.arenas.<i>.extents.<j>.n{dirty,muzzy,retained} (@tyleretzel)
	+ stats.arenas.<i>.extents.<j>.{dirty,muzzy,retained}_bytes
	  (@tyleretzel)

  Portability improvements:
  - Update MSVC builds.  (@maksqwe, @rustyx)
  - Workaround a compiler optimizer bug on s390x.  (@rkmisra)
  - Make use of pthread_set_name_np(3) on FreeBSD.  (@trasz)
  - Implement malloc_getcpu() to enable percpu_arena for windows.  (@santagada)
  - Link against -pthread instead of -lpthread.  (@paravoid)
  - Make background_thread not dependent on libdl.  (@interwq)
  - Add stringify to fix a linker directive issue on MSVC.  (@daverigby)
  - Detect and fall back when 8-bit atomics are unavailable.  (@interwq)
  - Fall back to the default pthread_create if dlsym(3) fails.  (@interwq)

  Optimizations and refactors:
  - Refactor the TSD module.  (@davidtgoldblatt)
  - Avoid taking extents_muzzy mutex when muzzy is disabled.  (@interwq)
  - Avoid taking large_mtx for auto arenas on the tcache flush path.  (@interwq)
  - Optimize ixalloc by avoiding a size lookup.  (@interwq)
  - Implement opt.oversize_threshold which uses a dedicated arena for requests
    crossing the threshold, also eagerly purges the oversize extents.  Default
    the threshold to 8 MiB.  (@interwq)
  - Clean compilation with -Wextra.  (@gnzlbg, @jasone)
  - Refactor the size class module.  (@davidtgoldblatt)
  - Refactor the stats emitter.  (@tyleretzel)
  - Optimize pow2_ceil.  (@rkmisra)
  - Avoid runtime detection of lazy purging on FreeBSD.  (@trasz)
  - Optimize mmap(2) alignment handling on FreeBSD.  (@trasz)
  - Improve error handling for THP state initialization.  (@jsteemann)
  - Rework the malloc() fast path.  (@djwatson)
  - Rework the free() fast path.  (@djwatson)
  - Refactor and optimize the tcache fill / flush paths.  (@djwatson)
  - Optimize sync / lwsync on PowerPC.  (@chmeeedalf)
  - Bypass extent_dalloc() when retain is enabled.  (@interwq)
  - Optimize the locking on large deallocation.  (@interwq)
  - Reduce the number of pages committed from sanity checking in debug build.
    (@trasz, @interwq)
  - Deprecate OSSpinLock.  (@interwq)
  - Lower the default number of background threads to 4 (when the feature
    is enabled).  (@interwq)
  - Optimize the trylock spin wait.  (@djwatson)
  - Use arena index for arena-matching checks.  (@interwq)
  - Avoid forced decay on thread termination when using background threads.
    (@interwq)
  - Disable muzzy decay by default.  (@djwatson, @interwq)
  - Only initialize libgcc unwinder when profiling is enabled.  (@paravoid,
    @interwq)

  Bug fixes (all only relevant to jemalloc 5.x):
  - Fix background thread index issues with max_background_threads.  (@djwatson,
    @interwq)
  - Fix stats output for opt.lg_extent_max_active_fit.  (@interwq)
  - Fix opt.prof_prefix initialization.  (@davidtgoldblatt)
  - Properly trigger decay on tcache destroy.  (@interwq, @amosbird)
  - Fix tcache.flush.  (@interwq)
  - Detect whether explicit extent zero out is necessary with huge pages or
    custom extent hooks, which may change the purge semantics.  (@interwq)
  - Fix a side effect caused by extent_max_active_fit combined with decay-based
    purging, where freed extents can accumulate and not be reused for an
    extended period of time.  (@interwq, @mpghf)
  - Fix a missing unlock on extent register error handling.  (@zoulasc)

  Testing:
  - Simplify the Travis script output.  (@gnzlbg)
  - Update the test scripts for FreeBSD.  (@devnexen)
  - Add unit tests for the producer-consumer pattern.  (@interwq)
  - Add Cirrus-CI config for FreeBSD builds.  (@jasone)
  - Add size-matching sanity checks on tcache flush.  (@davidtgoldblatt,
    @interwq)

  Incompatible changes:
  - Remove --with-lg-page-sizes.  (@davidtgoldblatt)

  Documentation:
  - Attempt to build docs by default, however skip doc building when xsltproc
    is missing. (@interwq, @cmuellner)

* 5.1.0 (May 4, 2018)
Qi Wang's avatar
Qi Wang committed

  This release is primarily about fine-tuning, ranging from several new features
  to numerous notable performance and portability enhancements.  The release and
  prior dev versions have been running in multiple large scale applications for
  months, and the cumulative improvements are substantial in many cases.

  Given the long and successful production runs, this release is likely a good
  candidate for applications to upgrade, from both jemalloc 5.0 and before.  For
  performance-critical applications, the newly added TUNING.md provides
  guidelines on jemalloc tuning.

  New features:
  - Implement transparent huge page support for internal metadata.  (@interwq)
  - Add opt.thp to allow enabling / disabling transparent huge pages for all
    mappings.  (@interwq)
  - Add maximum background thread count option.  (@djwatson)
  - Allow prof_active to control opt.lg_prof_interval and prof.gdump.
    (@interwq)
  - Allow arena index lookup based on allocation addresses via mallctl.
    (@lionkov)
  - Allow disabling initial-exec TLS model.  (@davidtgoldblatt, @KenMacD)
  - Add opt.lg_extent_max_active_fit to set the max ratio between the size of
    the active extent selected (to split off from) and the size of the requested
    allocation.  (@interwq, @davidtgoldblatt)
  - Add retain_grow_limit to set the max size when growing virtual address
    space.  (@interwq)
  - Add mallctl interfaces:
    + arena.<i>.retain_grow_limit  (@interwq)
    + arenas.lookup  (@lionkov)
    + max_background_threads  (@djwatson)
    + opt.lg_extent_max_active_fit  (@interwq)
    + opt.max_background_threads  (@djwatson)
    + opt.metadata_thp  (@interwq)
    + opt.thp  (@interwq)
    + stats.metadata_thp  (@interwq)

  Portability improvements:
  - Support GNU/kFreeBSD configuration.  (@paravoid)
  - Support m68k, nios2 and SH3 architectures.  (@paravoid)
  - Fall back to FD_CLOEXEC when O_CLOEXEC is unavailable.  (@zonyitoo)
  - Fix symbol listing for cross-compiling.  (@tamird)
  - Fix high bits computation on ARM.  (@davidtgoldblatt, @paravoid)
  - Disable the CPU_SPINWAIT macro for Power.  (@davidtgoldblatt, @marxin)
  - Fix MSVC 2015 & 2017 builds.  (@rustyx)
  - Improve RISC-V support.  (@EdSchouten)
  - Set name mangling script in strict mode.  (@nicolov)
  - Avoid MADV_HUGEPAGE on ARM.  (@marxin)
  - Modify configure to determine return value of strerror_r.
    (@davidtgoldblatt, @cferris1000)
  - Make sure CXXFLAGS is tested with CPP compiler.  (@nehaljwani)
  - Fix 32-bit build on MSVC.  (@rustyx)
  - Fix external symbol on MSVC.  (@maksqwe)
  - Avoid a printf format specifier warning.  (@jasone)
  - Add configure option --disable-initial-exec-tls which can allow jemalloc to
    be dynamically loaded after program startup.  (@davidtgoldblatt, @KenMacD)
  - AArch64: Add ILP32 support.  (@cmuellner)
  - Add --with-lg-vaddr configure option to support cross compiling.
    (@cmuellner, @davidtgoldblatt)

  Optimizations and refactors:
  - Improve active extent fit with extent_max_active_fit.  This considerably
    reduces fragmentation over time and improves virtual memory and metadata
    usage.  (@davidtgoldblatt, @interwq)
  - Eagerly coalesce large extents to reduce fragmentation.  (@interwq)
  - sdallocx: only read size info when page aligned (i.e. possibly sampled),
    which speeds up the sized deallocation path significantly.  (@interwq)
  - Avoid attempting new mappings for in place expansion with retain, since
    it rarely succeeds in practice and causes high overhead.  (@interwq)
  - Refactor OOM handling in newImpl.  (@wqfish)
  - Add internal fine-grained logging functionality for debugging use.
    (@davidtgoldblatt)
  - Refactor arena / tcache interactions.  (@davidtgoldblatt)
  - Refactor extent management with dumpable flag.  (@davidtgoldblatt)
  - Add runtime detection of lazy purging.  (@interwq)
  - Use pairing heap instead of red-black tree for extents_avail.  (@djwatson)
  - Use sysctl on startup in FreeBSD.  (@trasz)
  - Use thread local prng state instead of atomic.  (@djwatson)
  - Make decay to always purge one more extent than before, because in
    practice large extents are usually the ones that cross the decay threshold.
    Purging the additional extent helps save memory as well as reduce VM
    fragmentation.  (@interwq)
  - Fast division by dynamic values.  (@davidtgoldblatt)
  - Improve the fit for aligned allocation.  (@interwq, @edwinsmith)
  - Refactor extent_t bitpacking.  (@rkmisra)
  - Optimize the generated assembly for ticker operations.  (@davidtgoldblatt)
  - Convert stats printing to use a structured text emitter.  (@davidtgoldblatt)
  - Remove preserve_lru feature for extents management.  (@djwatson)
  - Consolidate two memory loads into one on the fast deallocation path.
    (@davidtgoldblatt, @interwq)

Loading full blame...