Skip to content

[8.0] Revert an earlier change to improve distribute free regions. #117543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 14, 2025

Conversation

mangod9
Copy link
Member

@mangod9 mangod9 commented Jul 11, 2025

This is a revert of #115023. We have seen a couple of reported issues after upgrading to 8.17 like : #117319

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 have many large allocations are seeing increased memory utilization after this fix since more memory is being held in the free region list. The same doesnt occur in 9 or 10, so some tuning parameters need to be adjusted.

Testing

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

Risk

Low, since this is a revert of an earlier fix in 8.17.

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 reverts a previous change (#115023) that improved free region distribution in the GC's region management system due to memory utilization regression issues in .NET 8.0. The change addresses customer-reported memory usage increases after upgrading to version 8.17, where certain workloads with many large allocations experienced higher memory consumption.

Key changes include:

  • Simplified the free region kind enumeration and age-based decommit logic
  • Removed complex region distribution algorithms and replaced with simpler time-based approach
  • Eliminated sophisticated memory pressure detection and decommit strategies

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/coreclr/gc/gcpriv.h Simplified free region enumeration, removed complex method declarations, and unified age threshold constants
src/coreclr/gc/gc.cpp Reverted complex region distribution logic to simpler time-based approach, removed memory pressure detection algorithms
Comments suppressed due to low confidence (2)

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

@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. please get a code review. we will take for consideration in 8.0.x

@jeffschwMSFT jeffschwMSFT added the Servicing-consider Issue for next servicing release review label Jul 11, 2025
@jeffschwMSFT jeffschwMSFT added this to the 8.0.x milestone Jul 11, 2025
@tarekgh
Copy link
Member

tarekgh commented Jul 11, 2025

@mangod9 Just a reminder, if you want to get this in the next servicing release, you need to merge this by Monday 14th at 4:00 PT.

Copy link
Member

@mrsharm mrsharm left a comment

Choose a reason for hiding this comment

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

LGTM

@artl93 artl93 added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jul 14, 2025
@mangod9 mangod9 merged commit 41fa3fb into release/8.0-staging Jul 14, 2025
119 of 122 checks passed
@mangod9 mangod9 deleted the undo_distribute_reg_staging branch July 14, 2025 20:57
mangod9 added a commit that referenced this pull request Jul 16, 2025
This was referenced Aug 7, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Aug 14, 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