Skip to content

Conversation

mangod9
Copy link
Member

@mangod9 mangod9 commented Apr 29, 2025

Port change for better free-list management. This is a back port of #109431

Customer Impact

  • Customer reported
  • Found internally

Memory utilization regression as part of Regions Enablement. Reported by a customer here: #103582.
The fix is to improve distribute_free_regions where aged regions are added to decommit list to ultimately free.

Regression

  • Yes
  • No

Yes in memory utilization. For certain customers who were running with dense containers they would observe an OOM occasionally.

Testing

Verified with internal performance testing. Provided a private to the customer to try out and they confirmed their memory utilization improved after the fix.

Risk

Low, this only impacts how free regions are deallocated.

@Copilot Copilot AI review requested due to automatic review settings April 29, 2025 23:02
@ghost ghost added the area-GC-coreclr label Apr 29, 2025
@mangod9 mangod9 requested a review from Maoni0 April 29, 2025 23:02
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR backports changes to improve free-list management in the garbage collector. The key changes include updating the free_region_kind enum to better distinguish region types, adding new free-list management methods to gc_heap, and introducing separate age thresholds for basic, large, and huge regions.

Copy link
Contributor

Tagging subscribers to this area: @dotnet/gc
See info in area-owners.md if you want to be subscribed.

Copy link
Member

@Maoni0 Maoni0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. we will take for consideration in 9.0.x

@jeffschwMSFT jeffschwMSFT added the Servicing-consider Issue for next servicing release review label May 1, 2025
@jeffschwMSFT jeffschwMSFT added this to the 9.0.x milestone May 1, 2025
@jeffschwMSFT jeffschwMSFT changed the title backport free-list change to release/9.0-staging [release/9.0-staging] improve distribute_free_regions May 6, 2025
@rbhanda rbhanda modified the milestones: 9.0.x, 9.0.6 May 6, 2025
@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels May 6, 2025
@mangod9 mangod9 merged commit af20fd0 into release/9.0-staging May 6, 2025
99 of 104 checks passed
@mangod9 mangod9 deleted the cp-freelist-9-staging branch May 6, 2025 20:02
@github-actions github-actions bot locked and limited conversation to collaborators Jun 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-GC-coreclr Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants