aboutsummaryrefslogtreecommitdiffstats
path: root/src/base.c
diff options
context:
space:
mode:
authorQi Wang <interwq@gwu.edu>2018-02-16 14:19:19 -0800
committerQi Wang <interwq@gmail.com>2018-03-08 13:08:06 -0800
commite4f090e8df5adf180662c5eeac2af214f9594de4 (patch)
treec28d30deba0a47dc7882910ae98eae625ef7e43a /src/base.c
parentefa40532dc0fc000345086757ecaf8875313a012 (diff)
downloadplatform_external_jemalloc_new-e4f090e8df5adf180662c5eeac2af214f9594de4.tar.gz
platform_external_jemalloc_new-e4f090e8df5adf180662c5eeac2af214f9594de4.tar.bz2
platform_external_jemalloc_new-e4f090e8df5adf180662c5eeac2af214f9594de4.zip
Add opt.thp which allows explicit hugepage usage.
"always" marks all user mappings as MADV_HUGEPAGE; while "never" marks all mappings as MADV_NOHUGEPAGE. The default setting "default" does not change any settings. Note that all the madvise calls are part of the default extent hooks by design, so that customized extent hooks have complete control over the mappings including hugepage settings.
Diffstat (limited to 'src/base.c')
-rw-r--r--src/base.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/base.c b/src/base.c
index cc3d9781..bb897a25 100644
--- a/src/base.c
+++ b/src/base.c
@@ -24,7 +24,8 @@ const char *metadata_thp_mode_names[] = {
static inline bool
metadata_thp_madvise(void) {
- return (metadata_thp_enabled() && thp_state_madvise);
+ return (metadata_thp_enabled() &&
+ (init_system_thp_mode == thp_mode_default));
}
static void *