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

Use custom GC PAL for all GC build flavors #72684

Closed
jkotas opened this issue Jul 22, 2022 · 3 comments · Fixed by #76985 or #77468
Closed

Use custom GC PAL for all GC build flavors #72684

jkotas opened this issue Jul 22, 2022 · 3 comments · Fixed by #76985 or #77468
Labels
area-GC-coreclr tenet-performance Performance related issue
Milestone

Comments

@jkotas
Copy link
Member

jkotas commented Jul 22, 2022

The standalone GC is using custom PAL on Unix: https://github.com/dotnet/runtime/blob/main/src/coreclr/gc/unix/gcenv.unix.cpp

The built-in GC is using PAL from https://github.com/dotnet/runtime/blob/main/src/coreclr/vm/gcenv.os.cpp. This PAL runs on top Win32 emulated APIs that come with extra overhead (extra tracking structures and extra locks). We have observed cases where this overhead is fairly significant.

We should switch the default built-in GC to use the custom PAL to eliminate the overhead of Win32 API emulation on Unix.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jul 22, 2022
@jkotas jkotas added area-GC-coreclr tenet-performance Performance related issue and removed area-PAL-coreclr untriaged New issue has not been triaged by the area owner labels Jul 22, 2022
@ghost
Copy link

ghost commented Jul 22, 2022

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

Issue Details

The standalone GC is using custom PAL on Unix: https://github.com/dotnet/runtime/blob/main/src/coreclr/gc/unix/gcenv.unix.cpp

The built-in GC using PAL from https://github.com/dotnet/runtime/blob/main/src/coreclr/vm/gcenv.os.cpp. This PAL runs on top Win32 emulated APIs that comes with extra overhead (extra tracking structures and extra locks). We have observed cases where this overhead is fairly significant.

We should switch the default built-GC to use the custom PAL to eliminate the overhead of Win32 API emulation on Unix.

Author: jkotas
Assignees: -
Labels:

area-GC-coreclr

Milestone: -

@mangod9 mangod9 added this to the 8.0.0 milestone Jul 22, 2022
@Maoni0
Copy link
Member

Maoni0 commented Oct 12, 2022

note that this extra overhead is contributing to the extra 64mb committed/working set on linux for regions.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Oct 13, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Oct 25, 2022
@jkotas
Copy link
Member Author

jkotas commented Oct 25, 2022

This is fixed on Unix. There is still work left to do to switch to the standalone PAL layer on Windows and delete all duplicated code.

@jkotas jkotas reopened this Oct 25, 2022
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Oct 26, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Oct 26, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Nov 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-GC-coreclr tenet-performance Performance related issue
Projects
None yet
3 participants