aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorQi Wang <interwq@gwu.edu>2017-10-31 14:17:40 -0700
committerQi Wang <interwq@gmail.com>2017-11-01 13:52:06 -0700
commit58eba024c0fbda463eaf8b42772407894dba6eff (patch)
treee3d16aae1d58c22094a031c76f1e0d4abe31a198 /include
parent47203d5f422452def4cb29c0b7128cc068031100 (diff)
downloadplatform_external_jemalloc_new-58eba024c0fbda463eaf8b42772407894dba6eff.tar.gz
platform_external_jemalloc_new-58eba024c0fbda463eaf8b42772407894dba6eff.tar.bz2
platform_external_jemalloc_new-58eba024c0fbda463eaf8b42772407894dba6eff.zip
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.
Diffstat (limited to 'include')
-rw-r--r--include/jemalloc/internal/base_types.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/jemalloc/internal/base_types.h b/include/jemalloc/internal/base_types.h
index 97e38a97..b6db77df 100644
--- a/include/jemalloc/internal/base_types.h
+++ b/include/jemalloc/internal/base_types.h
@@ -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,
/*