From 1e3b8636ff02fa2150cd84720727d300455b4c63 Mon Sep 17 00:00:00 2001 From: David Goldblatt Date: Tue, 8 Dec 2020 09:39:27 -0800 Subject: [PATCH] HPA: Remove unused malloc_conf options. --- .../internal/jemalloc_internal_externs.h | 3 --- src/ctl.c | 9 --------- src/jemalloc.c | 18 ------------------ src/stats.c | 3 --- test/unit/mallctl.c | 3 --- 5 files changed, 36 deletions(-) diff --git a/include/jemalloc/internal/jemalloc_internal_externs.h b/include/jemalloc/internal/jemalloc_internal_externs.h index 814a7a1b..fb8dc3fe 100644 --- a/include/jemalloc/internal/jemalloc_internal_externs.h +++ b/include/jemalloc/internal/jemalloc_internal_externs.h @@ -13,10 +13,7 @@ extern bool opt_abort; extern bool opt_abort_conf; extern bool opt_confirm_conf; extern bool opt_hpa; -extern size_t opt_hpa_slab_goal; extern size_t opt_hpa_slab_max_alloc; -extern size_t opt_hpa_small_max; -extern size_t opt_hpa_large_min; extern size_t opt_hpa_sec_max_alloc; extern size_t opt_hpa_sec_max_bytes; diff --git a/src/ctl.c b/src/ctl.c index 4266e4bd..f113742f 100644 --- a/src/ctl.c +++ b/src/ctl.c @@ -91,10 +91,7 @@ CTL_PROTO(opt_abort) CTL_PROTO(opt_abort_conf) CTL_PROTO(opt_confirm_conf) CTL_PROTO(opt_hpa) -CTL_PROTO(opt_hpa_slab_goal) CTL_PROTO(opt_hpa_slab_max_alloc) -CTL_PROTO(opt_hpa_small_max) -CTL_PROTO(opt_hpa_large_min) CTL_PROTO(opt_hpa_sec_max_alloc) CTL_PROTO(opt_hpa_sec_max_bytes) CTL_PROTO(opt_hpa_sec_nshards) @@ -369,10 +366,7 @@ static const ctl_named_node_t opt_node[] = { {NAME("abort_conf"), CTL(opt_abort_conf)}, {NAME("confirm_conf"), CTL(opt_confirm_conf)}, {NAME("hpa"), CTL(opt_hpa)}, - {NAME("hpa_slab_goal"), CTL(opt_hpa_slab_goal)}, {NAME("hpa_slab_max_alloc"), CTL(opt_hpa_slab_max_alloc)}, - {NAME("hpa_small_max"), CTL(opt_hpa_small_max)}, - {NAME("hpa_large_min"), CTL(opt_hpa_large_min)}, {NAME("hpa_sec_max_alloc"), CTL(opt_hpa_sec_max_alloc)}, {NAME("hpa_sec_max_bytes"), CTL(opt_hpa_sec_max_bytes)}, {NAME("hpa_sec_nshards"), CTL(opt_hpa_sec_nshards)}, @@ -1920,10 +1914,7 @@ CTL_RO_NL_GEN(opt_abort, opt_abort, bool) CTL_RO_NL_GEN(opt_abort_conf, opt_abort_conf, bool) CTL_RO_NL_GEN(opt_confirm_conf, opt_confirm_conf, bool) CTL_RO_NL_GEN(opt_hpa, opt_hpa, bool) -CTL_RO_NL_GEN(opt_hpa_slab_goal, opt_hpa_slab_goal, size_t) CTL_RO_NL_GEN(opt_hpa_slab_max_alloc, opt_hpa_slab_max_alloc, size_t) -CTL_RO_NL_GEN(opt_hpa_small_max, opt_hpa_small_max, size_t) -CTL_RO_NL_GEN(opt_hpa_large_min, opt_hpa_large_min, size_t) CTL_RO_NL_GEN(opt_hpa_sec_max_alloc, opt_hpa_sec_max_alloc, size_t) CTL_RO_NL_GEN(opt_hpa_sec_max_bytes, opt_hpa_sec_max_bytes, size_t) CTL_RO_NL_GEN(opt_hpa_sec_nshards, opt_hpa_sec_nshards, size_t) diff --git a/src/jemalloc.c b/src/jemalloc.c index 30c2fe16..c2817cf1 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -138,9 +138,6 @@ malloc_mutex_t arenas_lock; /* The global hpa, and whether it's on. */ bool opt_hpa = false; size_t opt_hpa_slab_max_alloc = 256 * 1024; -size_t opt_hpa_slab_goal = 128 * 1024; -size_t opt_hpa_small_max = 32 * 1024; -size_t opt_hpa_large_min = 4 * 1024 * 1024; size_t opt_hpa_sec_max_alloc = 32 * 1024; /* These settings correspond to a maximum of 1MB cached per arena. */ @@ -1506,21 +1503,6 @@ malloc_conf_init_helper(sc_data_t *sc_data, unsigned bin_shard_sizes[SC_NBINS], CONF_HANDLE_SIZE_T(opt_hpa_sec_nshards, "hpa_sec_nshards", 0, 0, CONF_CHECK_MIN, CONF_DONT_CHECK_MAX, true); - /* - * These no longer have any effect, but various - * non-public test configs set them as we iterate on HPA - * development. We parse and report them for now, but - * they don't affect behavior. Eventually they'll be - * removed. - */ - CONF_HANDLE_SIZE_T(opt_hpa_slab_goal, "hpa_slab_goal", - PAGE, 512 * PAGE, CONF_CHECK_MIN, CONF_CHECK_MAX, - true) - CONF_HANDLE_SIZE_T(opt_hpa_small_max, "hpa_small_max", - PAGE, 0, CONF_CHECK_MIN, CONF_DONT_CHECK_MAX, true); - CONF_HANDLE_SIZE_T(opt_hpa_large_min, "hpa_large_min", - PAGE, 0, CONF_CHECK_MIN, CONF_DONT_CHECK_MAX, true); - if (CONF_MATCH("slab_sizes")) { if (CONF_MATCH_VALUE("default")) { sc_data_init(sc_data); diff --git a/src/stats.c b/src/stats.c index aab9fb5c..ab440c4d 100644 --- a/src/stats.c +++ b/src/stats.c @@ -1248,10 +1248,7 @@ stats_general_print(emitter_t *emitter) { OPT_WRITE_CHAR_P("percpu_arena") OPT_WRITE_SIZE_T("oversize_threshold") OPT_WRITE_BOOL("hpa") - OPT_WRITE_SIZE_T("hpa_slab_goal") OPT_WRITE_SIZE_T("hpa_slab_max_alloc") - OPT_WRITE_SIZE_T("hpa_small_max") - OPT_WRITE_SIZE_T("hpa_large_min") OPT_WRITE_SIZE_T("hpa_sec_max_alloc") OPT_WRITE_SIZE_T("hpa_sec_max_bytes") OPT_WRITE_SIZE_T("hpa_sec_nshards") diff --git a/test/unit/mallctl.c b/test/unit/mallctl.c index d4e2621e..72dc0f3d 100644 --- a/test/unit/mallctl.c +++ b/test/unit/mallctl.c @@ -164,10 +164,7 @@ TEST_BEGIN(test_mallctl_opt) { TEST_MALLCTL_OPT(bool, retain, always); TEST_MALLCTL_OPT(const char *, dss, always); TEST_MALLCTL_OPT(bool, hpa, always); - TEST_MALLCTL_OPT(size_t, hpa_slab_goal, always); TEST_MALLCTL_OPT(size_t, hpa_slab_max_alloc, always); - TEST_MALLCTL_OPT(size_t, hpa_small_max, always); - TEST_MALLCTL_OPT(size_t, hpa_large_min, always); TEST_MALLCTL_OPT(size_t, hpa_sec_max_alloc, always); TEST_MALLCTL_OPT(size_t, hpa_sec_max_bytes, always); TEST_MALLCTL_OPT(size_t, hpa_sec_nshards, always);