-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Move FlushProcessWriteBuffers to minipal #118161
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
Move FlushProcessWriteBuffers to minipal #118161
Conversation
Implements dotnet#117977 Also move the initialization of it and get of page size
Co-authored-by: Adeel Mujahid <[email protected]>
Thoughts about switching Mono to this implementation too? The current Mono implementation does not look 100% reliable. It does not lock the memory in place, etc. LGTM otherwise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements the migration of FlushProcessWriteBuffers
functionality from PAL to the minipal library. The change centralizes memory barrier operations across process-wide threads into a reusable minipal component, removing platform-specific implementations scattered throughout the runtime.
Key changes:
- Creates new minipal memory barrier API with initialization and execution functions
- Removes existing FlushProcessWriteBuffers implementations from PAL and runtime components
- Updates all call sites to use the new minipal API
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/native/minipal/memorybarrierprocesswide.h | New header defining minipal memory barrier API |
src/native/minipal/memorybarrierprocesswide.c | Implementation of cross-platform memory barrier functionality |
src/native/minipal/CMakeLists.txt | Adds new source file to minipal build |
src/coreclr/vm/*.cpp | Updates call sites to use minipal API instead of FlushProcessWriteBuffers |
src/coreclr/pal/src/thread/process.cpp | Removes old FlushProcessWriteBuffers implementation |
src/coreclr/pal/src/init/pal.cpp | Updates initialization to use minipal function |
src/coreclr/pal/src/include/pal/process.h | Removes old function declaration |
src/coreclr/pal/inc/pal.h | Removes FlushProcessWriteBuffers export |
src/coreclr/nativeaot/Runtime/*.cpp | Updates NativeAOT runtime to use minipal API |
src/coreclr/gc/*.cpp | Updates GC components to use minipal API |
I have opened sub-issue for it and we can try it in a followup PR #118834 |
/backport to release/10.0 |
Started backporting to release/10.0: https://github.com/dotnet/runtime/actions/runs/17152675956 |
|
Implements #117977
Also move the initialization of it and get of page size