summaryrefslogtreecommitdiffstats
path: root/include/jemalloc/internal/background_thread_inlines.h
Commit message (Collapse)AuthorAgeFilesLines
* Avoid inactivity_check within background threads.Qi Wang2017-06-221-2/+3
| | | | | | Passing is_background_thread down the decay path, so that background thread itself won't attempt inactivity_check. This fixes an issue with background thread doing trylock on a mutex it already owns.
* Check for background thread inactivity on extents_dalloc.Qi Wang2017-05-231-0/+35
| | | | | | 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.
* Implementing opt.background_thread.Qi Wang2017-05-231-0/+21
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).