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

Implement software write watch for GC heap feature for arm32. #113017

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

viewizard
Copy link
Member

This feature implementation allow enable background GC feature on arm32.

CC @dotnet/samsung

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Feb 28, 2025
Copy link
Contributor

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

@jkotas
Copy link
Member

jkotas commented Feb 28, 2025

@dotnet/gc We don't have software write watch enabled on any other 32-bit platforms. Do you see any issues with enabling it for Arm32?

@mangod9
Copy link
Member

mangod9 commented Feb 28, 2025

yeah feels odd to only enable on arm32 but not x86. We also have the 32-bit heaphardlimit support which we are still evaluating. The concern with these is their associated validation costs. @viewizard, do you have any perf results which show that background GC is going to make a significant difference in your scenarios?

@gbalykov
Copy link
Member

yeah feels odd to only enable on arm32 but not x86.

We want to reduce GC pause time on arm32 on Tizen. Currently we do not have any plans for x86 work in this area. Besides, last time we've checked, runtime on linux x86 was not in working condition and crashed on simple tests.

@viewizard, do you have any perf results which show that background GC is going to make a significant difference in your scenarios?

In some scenarios on Tizen apps we got max pause time reduction from approximately 100 ms to 45 ms, and average pause time also reduces approximately on 20-30%. @viewizard ran coreclr tests with write watch on arm32 (default, gcstress 0xc, jitstress 0x2, jitstressregs 0x2), no issues.

@filipnavara
Copy link
Member

filipnavara commented Feb 28, 2025

Currently we do not have any plans for x86 work in this area. Besides, last time we've checked, runtime on linux x86 was not in working condition and crashed on simple tests.

I fixed the basic linux-x86 build-and-run scenarios recently. I didn't run anything beside simple smoke tests but those work again. I can port the software write watch code there but since it's a community supported platform I don't think it would really move the needle. Not sure if there's any point in trying with win-x86.

@cshung
Copy link
Member

cshung commented Feb 28, 2025

Not sure if there's any point in trying with win-x86.

If we could get all the platforms to use software write watch, we could delete quite a bit of the legacy hardware write watch code, that is a win.

@Maoni0
Copy link
Member

Maoni0 commented Mar 1, 2025

there's very little code associated with "hardware write watch" since it's just calling a couple of OS APIs to get the pages written.
(btw, "hardware write watch" is really a misnomer, it should really be called "the OS write watch" as it's a few windows APIs, since all we do is calling those APIs there's really not much code at all. but "software write watch" which really means the same functionality implemented within the runtime, required much more code since we had to do the implementation ourselves)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-VM-coreclr community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants