summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * Make tsd no-cleanup during tsd reincarnation.Qi Wang2017-06-074-24/+51
| | | | | | | | | | Since tsd cleanup isn't guaranteed when reincarnated, we set up tsd in a way that needs no cleanup, by making it going through slow path instead.
| * Remove assertions on extent_hooks being default.Qi Wang2017-06-051-16/+0
| | | | | | | | | | It's possible to customize the extent_hooks while still using part of the default implementation.
| * Take background thread lock when setting extent hooks.Qi Wang2017-06-053-4/+15
| |
| * Set reentrancy level to 1 during init.Qi Wang2017-06-021-15/+28
| | | | | | | | This makes sure we go down slow path w/ a0 in init.
| * Set isthreaded when enabling background_thread.Qi Wang2017-06-023-23/+41
| |
| * Fix background thread creation.Qi Wang2017-06-011-13/+17
| | | | | | | | The state initialization should be done before pthread_create.
| * Test with background_thread:true.Jason Evans2017-06-014-6/+35
| | | | | | | | | | | | Add testing for background_thread:true, and condition a xallocx() --> rallocx() escalation assertion to allow for spurious in-place rallocx() following xallocx() failure.
| * Refactor/fix background_thread/percpu_arena bootstrapping.Jason Evans2017-06-0112-124/+161
| | | | | | | | | | Refactor bootstrapping such that dlsym() is called during the bootstrapping phase that can tolerate reentrant allocation.
| * Skip default tcache testing if !opt_tcache.Jason Evans2017-06-011-4/+4
| |
| * Witness assertions: only assert locklessness when non-reentrant.David Goldblatt2017-06-011-49/+62
| | | | | | | | | | Previously we could still hit these assertions down error paths or in the extended API.
| * Use real pthread_create for creating background threads.Qi Wang2017-05-312-3/+9
| |
| * Clean source directory before building tests in object directories.Jason Evans2017-05-311-0/+1
| |
| * Header refactoring: Pull size helpers out of jemalloc module.David Goldblatt2017-05-3128-596/+642
| |
| * Header refactoring: unify and de-catchall mutex_pool.David Goldblatt2017-05-317-26/+15
| |
| * Header refactoring: unify and de-catchall extent_mmap module.David Goldblatt2017-05-3110-4/+11
| |
| * Header refactoring: unify and de-catchall extent_dss.David Goldblatt2017-05-3112-37/+33
| |
| * Header refactoring: unify and de-catchall rtree module.David Goldblatt2017-05-3118-170/+166
| |
| * Add /run_tests.out/ to .gitignore.David Goldblatt2017-05-311-0/+2
| |
| * Pass the O_CLOEXEC flag to open(2).Jason Evans2017-05-312-4/+5
| | | | | | | | This resolves #528.
| * Track background thread status separately at fork.Qi Wang2017-05-311-3/+8
| | | | | | | | | | Use a separate boolean to track the enabled status, instead of leaving the global background thread status inconsistent.
| * Output total_wait_ns for bin mutexes.Qi Wang2017-05-311-19/+5
| |
| * Add jemalloc prefix to allocator functions pruned by jeprof.Jason Evans2017-05-312-13/+14
| | | | | | | | This resolves #507.
| * Explicitly say so when aborting on opt_abort_conf.Qi Wang2017-05-311-2/+10
| |
| * More thoroughly document the *.{nmalloc,ndalloc,nrequests} mallctls.Jason Evans2017-05-301-24/+50
| | | | | | | | This resolves #412.
| * Add the --disable-thp option to support cross compiling.Jason Evans2017-05-308-14/+53
| | | | | | | | This resolves #669.
| * Fix npages during arena_decay_epoch_advance().Qi Wang2017-05-301-20/+14
| | | | | | | | | | We do not lock extents while advancing epoch. This change makes sure that we only read npages from extents once in order to avoid any inconsistency.
| * Add test for excessive retained memory.Jason Evans2017-05-302-0/+180
| |
| * Fix extent_grow_next management.Jason Evans2017-05-304-159/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix management of extent_grow_next to serialize operations that may grow retained memory. This assures that the sizes of the newly allocated extents correspond to the size classes in the intended growth sequence. Fix management of extent_grow_next to skip size classes if a request is too large to be satisfied by the next size in the growth sequence. This avoids the potential for an arbitrary number of requests to bypass triggering extent_grow_next increases. This resolves #858.
| * Fix OOM paths in extent_grow_retained().Jason Evans2017-05-301-2/+8
| |
| * Add opt.stats_print_opts.Qi Wang2017-05-295-45/+94
| | | | | | | | The value is passed to atexit(3)-triggered malloc_stats_print() calls.
| * Make test/unit/background_thread not flaky.Qi Wang2017-05-271-3/+5
| |
| * Added opt_abort_conf: abort on invalid config options.Qi Wang2017-05-275-15/+56
| |
| * Fix run_tests to avoid percpu_arena on !Linux.Jason Evans2017-05-261-3/+3
| |
| * Cleanup smoothstep.sh / .h.Qi Wang2017-05-254-207/+205
| | | | | | | | h_step_sum was used to compute moving sum. Not in use anymore.
| * Fix stats.mapped during deallocation.Qi Wang2017-05-241-1/+1
| |
| * Refactor run_tests to increase parallelism.Jason Evans2017-05-241-13/+45
| | | | | | | | | | | | | | | | Rather than relying on parallel make to build individual configurations one at a time, use xargs to build multiple configurations in parallel. This allows the configure scripts to run in parallel. On a 14-core system (28 hyperthreads), this increases average CPU utilization from ~20% to ~90%.
| * Header refactoring: unify and de-catchall mutex moduleDavid Goldblatt2017-05-2434-287/+304
| |
| * Header refactoring: unify and de-catchall witness code.David Goldblatt2017-05-2418-540/+604
| |
| * Disable percpu_arena by default.Jason Evans2017-05-235-11/+36
| |
| * Do not assume dss never decreases.Jason Evans2017-05-231-38/+34
| | | | | | | | | | | | | | | | | | An sbrk() caller outside jemalloc can decrease the dss, so add a separate atomic boolean to explicitly track whether jemalloc is concurrently calling sbrk(), rather than depending on state outside jemalloc's full control. This resolves #802.
| * Add dss:primary testing.Jason Evans2017-05-233-20/+59
| | | | | | | | | | | | Generalize the run_tests.sh and .travis.yml test generation to handle combinations of arguments to the --with-malloc-conf configure option, and merge "dss:primary" into the existing "tcache:false" testing.
| * Do not hold the base mutex while calling extent hooks.Jason Evans2017-05-231-0/+6
| | | | | | | | | | | | | | | | | | Drop the base mutex while allocating new base blocks, because extent allocation can enter code that prohibits holding non-core mutexes, e.g. the extent_[d]alloc() and extent_purge_forced_wrapper() calls in extent_alloc_dss(). This partially resolves #802.
| * Fix # of unpurged pages in decay algorithm.Qi Wang2017-05-232-10/+28
| | | | | | | | | | | | | | | | | | | | When # of dirty pages move below npages_limit (e.g. they are reused), we should not lower number of unpurged pages because that would cause the reused pages to be double counted in the backlog (as a result, decay happen slower than it should). Instead, set number of unpurged to the greater of current npages and npages_limit. Added an assertion: the ceiling # of pages should be greater than npages_limit.
| * Check for background thread inactivity on extents_dalloc.Qi Wang2017-05-234-23/+91
| | | | | | | | | | | | To avoid background threads sleeping forever with idle arenas, we eagerly check background threads' sleep time after extents_dalloc, and signal the thread if necessary.
| * Add tests for background threads.Qi Wang2017-05-233-0/+119
| |
| * Add documentation for background_thread related options.Qi Wang2017-05-231-0/+78
| |
| * Add profiling for the background thread mutex.Qi Wang2017-05-234-6/+21
| |
| * Add background thread related stats.Qi Wang2017-05-239-21/+214
| |
| * Implementing opt.background_thread.Qi Wang2017-05-2323-348/+1245
| | | | | | | | | | | | | | | | | | | | | | Added opt.background_thread to enable background threads, which handles purging currently. When enabled, decay ticks will not trigger purging (which will be left to the background threads). We limit the max number of threads to NCPUs. When percpu arena is enabled, set CPU affinity for the background threads as well. The sleep interval of background threads is dynamic and determined by computing number of pages to purge in the future (based on backlog).
| * Protect the rtree/extent interactions with a mutex pool.David Goldblatt2017-05-1918-536/+340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of embedding a lock bit in rtree leaf elements, we associate extents with a small set of mutexes. This gets us two things: - We can use the system mutexes. This (hypothetically) protects us from priority inversion, and lets us stop doing a backoff/sleep loop, instead opting for precise wakeups from the mutex. - Cuts down on the number of mutex acquisitions we have to do (from 4 in the worst case to two). We end up simplifying most of the rtree code (which no longer has to deal with locking or concurrency at all), at the cost of additional complexity in the extent code: since the mutex protecting the rtree leaf elements is determined by reading the extent out of those elements, the initial read is racy, so that we may acquire an out of date mutex. We re-check the extent in the leaf after acquiring the mutex to protect us from this race.