Skip to content

Commit Accounting related changes - #100380

Merged
cshung merged 7 commits into
dotnet:mainfrom
cshung:public/fix-refresh-memory-limit
May 22, 2024
Merged

Commit Accounting related changes#100380
cshung merged 7 commits into
dotnet:mainfrom
cshung:public/fix-refresh-memory-limit

Conversation

@cshung

@cshungcshung commented Mar 28, 2024

Copy link
Copy Markdown
Contributor
  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.

@cshungcshung self-assigned this Mar 28, 2024
@cshung
cshung marked this pull request as draft March 28, 2024 00:57
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@cshung
cshungforce-pushed the public/fix-refresh-memory-limit branch 2 times, most recently from 9beeb42 to 34c53c5CompareApril 12, 2024 18:45
@cshungcshung changed the title Adding missed synchronizationCommit Accounting related changesApr 22, 2024
@cshung
cshungforce-pushed the public/fix-refresh-memory-limit branch 2 times, most recently from cc4c736 to fcbcdc2CompareApril 28, 2024 06:24
Comment threadsrc/coreclr/gc/gc.cpp Outdated
Comment threadsrc/coreclr/gc/gc.cpp Outdated
Comment threadsrc/coreclr/gc/gc.cpp Outdated
Comment threadsrc/coreclr/gc/gc.cpp
Comment threadsrc/coreclr/gc/gc.cpp
Comment threadsrc/coreclr/gc/gc.cpp
Comment threadsrc/coreclr/gc/gc.cpp Outdated
Comment threadsrc/coreclr/gc/gc.cpp
Comment threadsrc/coreclr/gc/gc.cpp
Comment threadsrc/coreclr/gc/gc.cpp
Comment threadsrc/coreclr/gc/gc.cpp Outdated
Comment threadsrc/coreclr/gc/gc.cpp
Comment threadsrc/coreclr/gc/gc.cpp
Comment threadsrc/coreclr/gc/gc.cpp
Comment threadsrc/coreclr/gc/gc.cpp Outdated
@cshung
cshungforce-pushed the public/fix-refresh-memory-limit branch from 4d24a44 to 78d6849CompareMay 8, 2024 19:36
@cshung
cshungforce-pushed the public/fix-refresh-memory-limit branch from 78d6849 to 1a3ef3cCompareMay 8, 2024 19:41
@cshung
cshung marked this pull request as ready for review May 9, 2024 00:30
Comment threadsrc/coreclr/gc/gc.cpp Outdated

@Maoni0Maoni0 left a comment

Copy link
Copy Markdown
Member

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:mainMay 22, 2024
@cshung
cshung deleted the public/fix-refresh-memory-limit branch May 22, 2024 20:58
@cshung

Copy link
Copy Markdown
ContributorAuthor

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-actionsgithub-actionsBot locked and limited conversation to collaborators Jun 22, 2024
Sign up for freeto 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

@cshung@Maoni0