Skip to content

Commit

Permalink
Enable releasing free hugepages from HugeRegions by default.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 562832763
Change-Id: I50681c974d7bca8ccc9e786356d44436ef155f52
  • Loading branch information
v-gogte authored and copybara-github committed Sep 5, 2023
1 parent 67924d8 commit 002b8b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tcmalloc/parameters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ ABSL_CONST_INIT std::atomic<bool> Parameters::improved_guarded_sampling_(true);
ABSL_CONST_INIT std::atomic<bool> Parameters::release_partial_alloc_pages_(
true);
ABSL_CONST_INIT std::atomic<bool> Parameters::release_pages_from_huge_region_(
false);
true);
ABSL_CONST_INIT std::atomic<int64_t> Parameters::max_total_thread_cache_bytes_(
kDefaultOverallThreadCacheSize);
ABSL_CONST_INIT std::atomic<double>
Expand Down
4 changes: 2 additions & 2 deletions tcmalloc/testing/get_stats_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ TEST_F(GetStatsTest, Pbtxt) {
EXPECT_THAT(buf, HasSubstr("tcmalloc_skip_subrelease_long_interval_ns: 0"));

EXPECT_THAT(buf, HasSubstr("tcmalloc_release_partial_alloc_pages: true"));
EXPECT_THAT(buf, HasSubstr("tcmalloc_release_pages_from_huge_region: false"));
EXPECT_THAT(buf, HasSubstr("tcmalloc_release_pages_from_huge_region: true"));
EXPECT_THAT(buf, HasSubstr("tcmalloc_resize_cpu_cache_size_classes: true"));
EXPECT_THAT(buf, ContainsRegex("(tcmalloc_filler_chunks_per_alloc: 8|(16))"));

Expand Down Expand Up @@ -164,7 +164,7 @@ TEST_F(GetStatsTest, Parameters) {
buf, HasSubstr(R"(PARAMETER tcmalloc_release_partial_alloc_pages 1)"));
EXPECT_THAT(
buf,
HasSubstr(R"(PARAMETER tcmalloc_release_pages_from_huge_region 0)"));
HasSubstr(R"(PARAMETER tcmalloc_release_pages_from_huge_region 1)"));
EXPECT_THAT(
buf,
HasSubstr(R"(PARAMETER tcmalloc_resize_cpu_cache_size_classes 1)"));
Expand Down

0 comments on commit 002b8b8

Please sign in to comment.