Skip to content

Commit

Permalink
Make HPAA unconditional for small-but-slow.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 681517744
Change-Id: I0a771c3188cfddf62bc0964cb77e9213423edf5f
  • Loading branch information
ckennelly authored and copybara-github committed Oct 2, 2024
1 parent eab120c commit 639010e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
5 changes: 2 additions & 3 deletions tcmalloc/huge_page_aware_allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ namespace tcmalloc {
namespace tcmalloc_internal {
namespace huge_page_allocator_internal {

// TODO(b/137017688): Make this unconditional.
// TODO(b/228848071): Include small-but-slow.
constexpr bool kUnconditionalHPAA = kPageSize >= 8192;
// TODO(b/137017688): Constant propagate.
constexpr bool kUnconditionalHPAA = true;

bool decide_subrelease();

Expand Down
3 changes: 2 additions & 1 deletion tcmalloc/page_allocator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ PageAllocator::PageAllocator() {
}
alg_ = HPAA;
} else {
#if defined(TCMALLOC_INTERNAL_SMALL_BUT_SLOW)
// TODO(b/137017688): Constant propagate.
#if 0
normal_impl_[0] = new (&choices_[part++].ph) PageHeap(MemoryTag::kNormal);
if (tc_globals.numa_topology().numa_aware()) {
normal_impl_[1] =
Expand Down
10 changes: 0 additions & 10 deletions tcmalloc/variants.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,6 @@ test_variants = [
"deps": ["//tcmalloc:common_8k_pages"],
"env": {"BORG_EXPERIMENTS": "TEST_ONLY_TCMALLOC_HUGE_CACHE_RELEASE_30S"},
},
{
"name": "small_but_slow_no_hpaa",
"malloc": "//tcmalloc:tcmalloc_small_but_slow",
"deps": [
"//tcmalloc:common_small_but_slow",
"//tcmalloc:want_no_hpaa",
],
"copts": ["-DTCMALLOC_INTERNAL_SMALL_BUT_SLOW"],
"tags": ["noubsan"],
},
{
"name": "hpaa",
"malloc": "//tcmalloc",
Expand Down

0 comments on commit 639010e

Please sign in to comment.