metadata_thp: auto mode adjustment for a0.

We observed that arena 0 can have much more metadata allocated comparing to
other arenas.  Tune the auto mode to only switch to huge page on the 5th block
(instead of 3 previously) for a0.
This commit is contained in:
Qi Wang
2017-10-31 14:17:40 -07:00
committed by Qi Wang
parent 47203d5f42
commit 58eba024c0
2 changed files with 31 additions and 19 deletions

View File

@@ -6,6 +6,15 @@ typedef struct base_s base_t;
#define METADATA_THP_DEFAULT metadata_thp_disabled
/*
* In auto mode, arenas switch to huge pages for the base allocator on the
* second base block. a0 switches to thp on the 5th block (after 20 megabytes
* of metadata), since more metadata (e.g. rtree nodes) come from a0's base.
*/
#define BASE_AUTO_THP_THRESHOLD 2
#define BASE_AUTO_THP_THRESHOLD_A0 5
typedef enum {
metadata_thp_disabled = 0,
/*