Skip to content
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

Commit Accounting related changes #100380

Merged
merged 7 commits into from
May 22, 2024

Conversation

cshung
Copy link
Member

@cshung cshung commented Mar 28, 2024

  1. When heap_segment are moved across heaps during change_heap_count, this change records them so that committed_by_oh_per_heap is still valid.
  2. Keep track of the various committed_by values regardless of heap_hard_limit, which will allow us refresh_memory_limit for segments.
  3. Various refactoring to avoid duplicating code for verification.
  4. Moved verify_regions into _DEBUG.
  5. When release_segment, heap_segment are released by virtual_free, we need to also decrement the committed counters when that happen.
  6. When get_segment, we accidentally used max_generation as oh for UOH segments, this change will make it use the right oh.
  7. If we failed to grow_brick_card_table, heap_segment are released by virtual_free, we need to also decrement the committed counters when that happen.
  8. Compute the amount of memory spent on bookkeeping data for segments, and give up accounting for mark array

... to be continued.

@cshung cshung self-assigned this Mar 28, 2024
@cshung cshung marked this pull request as draft March 28, 2024 00:57
Copy link
Contributor

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

src/coreclr/gc/gc.cpp Outdated Show resolved Hide resolved
src/coreclr/gc/gc.cpp Outdated Show resolved Hide resolved
src/coreclr/gc/gc.cpp Outdated Show resolved Hide resolved
src/coreclr/gc/gc.cpp Outdated Show resolved Hide resolved
@cshung cshung force-pushed the public/fix-refresh-memory-limit branch from 4d24a44 to 78d6849 Compare May 8, 2024 19:36
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.

other than the one small comment, LGTM!

@cshung cshung merged commit 3608eee into dotnet:main May 22, 2024
89 checks passed
@cshung cshung deleted the public/fix-refresh-memory-limit branch May 22, 2024 20:58
@cshung
Copy link
Member Author

cshung commented May 22, 2024

This change is tested with all these combinations:

x86/x64
chk
wks/svr/datas (x64 only)
(no defines/committed_bytes_shadow/committed_bytes_shadow + stress_dynamic_heap_count)
(plug test case/gcperfsim)

Bug #102585 is found, but it is unrelated to commit accounting.

steveharter pushed a commit to steveharter/runtime that referenced this pull request May 28, 2024
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants