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

Introduce scheduler pollset for nif select #9275

Open
wants to merge 9 commits into
base: maint
Choose a base branch
from

Conversation

garazdawi
Copy link
Contributor

When FD polling on unix was migrated to a separate thread in OTP-21, polling on FDs that exhibit an "active true" behaviour for drivers were placed in a separate scheduler pollset in order to reduce the number of modifications of the pollset and thus reduce CPU cost. This PR introduces the same mechanism for FDs selected on by nifs.

@garazdawi garazdawi added team:VM Assigned to OTP team VM feature labels Jan 8, 2025
@garazdawi garazdawi added this to the OTP-28.0 milestone Jan 8, 2025
@garazdawi garazdawi requested a review from sverker January 8, 2025 12:41
@garazdawi garazdawi self-assigned this Jan 8, 2025
@garazdawi garazdawi changed the base branch from master to maint January 8, 2025 12:46
@garazdawi garazdawi force-pushed the lukas/erts/enif_scheduler_pollset branch from 9cc5222 to c440365 Compare January 9, 2025 08:52
Copy link
Contributor

github-actions bot commented Jan 9, 2025

CT Test Results

    3 files    143 suites   48m 58s ⏱️
1 597 tests 1 548 ✅ 49 💤 0 ❌
2 341 runs  2 267 ✅ 74 💤 0 ❌

Results for commit 157d350.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@michalmuskala
Copy link
Contributor

Would the main impact on this inside OTP be related to the file API and socket NIFs? Are there any other parts that would use the separate pollset?

@garazdawi
Copy link
Contributor Author

Are there any other parts that would use the separate pollset?

The primary user is the socket nifs, but also the shell uses it :) File does not use select (as far as I know), so will not be effected.

@garazdawi garazdawi force-pushed the lukas/erts/enif_scheduler_pollset branch 2 times, most recently from 89fc8b6 to 0a3cb7f Compare January 13, 2025 13:46
@garazdawi garazdawi force-pushed the lukas/erts/enif_scheduler_pollset branch from 0a3cb7f to 7dfda88 Compare January 13, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants