pidwait: replace busy-loop with pidfd_open and poll on Linux#711
Open
Krysztal112233 wants to merge 1 commit into
Open
pidwait: replace busy-loop with pidfd_open and poll on Linux#711Krysztal112233 wants to merge 1 commit into
pidfd_open and poll on Linux#711Krysztal112233 wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #711 +/- ##
==========================================
- Coverage 19.21% 19.19% -0.02%
==========================================
Files 68 68
Lines 10150 10158 +8
Branches 546 546
==========================================
Hits 1950 1950
- Misses 8200 8208 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4c4b260 to
8df52cb
Compare
|
Nice to see the new implementation here. Ima like dropping my pull request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR pick the Linux implementation from PR #400 to replace the inefficient busy-loop polling (
/procevery 50ms) withpidfd_open+poll, which blocks efficiently in the kernel with zero CPU usage.Also added a simple test to verify the wait works correctly.
Thanks for @FurryR