Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Sep 29, 2022

Following recent cgroup support (#74237), mono_determine_physical_ram_size is no longer safe to call during GC.

Following recent cgroup support, mono_determine_physical_ram_size is no longer safe to call during GC.
@ghost ghost added the area-GC-mono label Sep 29, 2022
@ghost ghost assigned BrzVlad Sep 29, 2022
@ghost
Copy link

ghost commented Sep 29, 2022

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

Issue Details

Following recent cgroup support (#74237), mono_determine_physical_ram_size is no longer safe to call during GC.

Author: BrzVlad
Assignees: -
Labels:

area-GC-mono

Milestone: -

@BrzVlad
Copy link
Member Author

BrzVlad commented Sep 29, 2022

@nealef @akoeplinger Any idea if this impacts android ?

@naricc
Copy link
Contributor

naricc commented Sep 30, 2022

What part of #74237 makes it unsafe to call mono_determine_physical_ram_size during GC?

@nealef
Copy link
Contributor

nealef commented Sep 30, 2022

@nealef @akoeplinger Any idea if this impacts android ?

The new code explicitly excludes Android. That is, it uses the previous code path.

@BrzVlad
Copy link
Member Author

BrzVlad commented Sep 30, 2022

@naricc getCGroupMemoryLimit is the main one, it uses a lot of C api's that are unsafe.

@akoeplinger
Copy link
Member

I didn't realize we query the ram size on each GC stw cycle, do we know if the cgroup additions have any perf impact?

We'll also need to backport this to 7.0 since we backported the cgroup change.

@naricc
Copy link
Contributor

naricc commented Sep 30, 2022

I didn't realize we query the ram size on each GC stw cycle, do we know if the cgroup additions have any perf impact?

I have not seen any perf regressions that I could attribute to this, although the microbenchmarks are so micro I am not sure how many of them exercise the GC much. There was also some missing data on some platforms around the time this was merged.

@akoeplinger
Copy link
Member

Failures are unrelated.

@akoeplinger akoeplinger merged commit a08d300 into dotnet:main Oct 3, 2022
@akoeplinger
Copy link
Member

/backport to release/7.0

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2022

Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3174227750

@ghost ghost locked as resolved and limited conversation to collaborators Nov 2, 2022
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.

4 participants