summaryrefslogtreecommitdiffstats
path: root/include/jemalloc/internal/background_thread_structs.h
Commit message (Collapse)AuthorAgeFilesLines
* Combine background_thread started / paused into state.Qi Wang2017-06-121-4/+8
|
* Move background thread creation to background_thread_0.Qi Wang2017-06-121-0/+2
| | | | | To avoid complications, avoid invoking pthread_create "internally", instead rely on thread0 to launch new threads, and also terminating threads when asked.
* Refactor/fix background_thread/percpu_arena bootstrapping.Jason Evans2017-06-011-0/+4
| | | | | Refactor bootstrapping such that dlsym() is called during the bootstrapping phase that can tolerate reentrant allocation.
* Check for background thread inactivity on extents_dalloc.Qi Wang2017-05-231-4/+10
| | | | | | 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 background thread related stats.Qi Wang2017-05-231-0/+11
|
* Implementing opt.background_thread.Qi Wang2017-05-231-0/+25
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).