mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-23 03:12:11 +03:00
Fix # of unpurged pages in decay algorithm.
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.
This commit is contained in:
parent
0eae838b0d
commit
eeefdf3ce8
2 changed files with 29 additions and 11 deletions
|
|
@ -103,6 +103,8 @@ struct arena_decay_s {
|
|||
*
|
||||
* Synchronization: Same as associated arena's stats field. */
|
||||
decay_stats_t *stats;
|
||||
/* Peak number of pages in associated extents. Used for debug only. */
|
||||
uint64_t ceil_npages;
|
||||
};
|
||||
|
||||
struct arena_bin_s {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue