Skip to content

tcmalloc: Expose flag and parameter for unbacked hugepage subrelease mode - #943

Draft
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_982530158
Draft

copybara-service[bot] wants to merge 1 commit into
masterfrom
test_982530158

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

tcmalloc: Expose flag and parameter for unbacked hugepage subrelease mode

Expose the --tcmalloc_subrelease_unbacked_hugepages flag and
Parameters::set_subrelease_unbacked_hugepages API to allow configuring
unbacked hugepage subrelease mode at startup and dynamically at runtime.
Rather than pushing updates into HugePageFiller upon flag changes,
HugePageAwareAllocator reads the parameter lazily during gardening and page
release, updating filler state under pageheap_lock.

To make runtime mode toggling O(1) without requiring expensive list migrations,
PageTracker now tracks its filler list membership via in_released_list_.
This ensures trackers unlinking from filler lists correctly identify their
origin list and preserve used-page counter invariants without scanning lists
on mode changes.

@copybara-service
copybara-service Bot force-pushed the test_982530158 branch 5 times, most recently from c8979d2 to dde292f Compare September 16, 2026 21:00
@copybara-service copybara-service Bot changed the title Expose runtime toggle for unbacked hugepage subrelease mode. tcmalloc: Expose flag and parameter for unbacked hugepage subrelease mode Sep 16, 2026
@copybara-service
copybara-service Bot force-pushed the test_982530158 branch 2 times, most recently from 8e59565 to 5c89b39 Compare September 17, 2026 00:31
…mode

Expose the `--tcmalloc_subrelease_unbacked_hugepages` flag and
`Parameters::set_subrelease_unbacked_hugepages` API to allow configuring
unbacked hugepage subrelease mode at startup and dynamically at runtime.
Rather than pushing updates into `HugePageFiller` upon flag changes,
`HugePageAwareAllocator` reads the parameter lazily during gardening and page
release, updating filler state under `pageheap_lock`.

To make runtime mode toggling O(1) without requiring expensive list migrations,
`PageTracker` now tracks its filler list membership via `in_released_list_`.
This ensures trackers unlinking from filler lists correctly identify their
origin list and preserve used-page counter invariants without scanning lists
on mode changes.

PiperOrigin-RevId: 982530158

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant