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 futex-based locks and thread parker on {Free, Open, DragonFly}BSD. #96510

Merged
merged 11 commits into from May 6, 2022

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Apr 28, 2022

This switches *BSD to our futex-based locks and thread parker.

Tracking issue: #93740

r? @Amanieu

@m-ou-se m-ou-se added A-concurrency Area: Concurrency related issues. O-openbsd Operating system: OpenBSD O-freebsd Operating system: FreeBSD O-netbsd Operating system: NetBSD S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. O-dragonfly Operating system: DragonFly BSD T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 28, 2022
@rust-highfive

This comment was marked as off-topic.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 28, 2022
@m-ou-se
Copy link
Member Author

m-ou-se commented Apr 28, 2022

cc @semarie

@rust-log-analyzer

This comment has been minimized.

@m-ou-se m-ou-se marked this pull request as ready for review April 29, 2022 18:02
@m-ou-se m-ou-se removed the S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. label Apr 29, 2022
Copy link
Member

@Amanieu Amanieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation mostly looks good to me. Have you actually tested these on a BSD system? We don't test those in CI.

library/std/src/sys/unix/futex.rs Outdated Show resolved Hide resolved
library/std/src/sys/unix/futex.rs Outdated Show resolved Hide resolved
@m-ou-se m-ou-se changed the title Use futex-based locks and thread parker on {Free, Open, Net, DragonFly}BSD. Use futex-based locks and thread parker on {Free, Open, DragonFly}BSD. May 3, 2022
We don't guarantee this panics. On most platforms it doesn't anymore.
@m-ou-se
Copy link
Member Author

m-ou-se commented May 5, 2022

I've tested this change on FreeBSD, and all of std's test pass just fine.

@Amanieu
Copy link
Member

Amanieu commented May 5, 2022

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented May 5, 2022

📌 Commit 21c5f78 has been approved by Amanieu

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 5, 2022
@bors
Copy link
Contributor

bors commented May 5, 2022

⌛ Testing commit 21c5f78 with merge 3beddd083e1fd318b89445a6282e80c46da01c5f...

@bors
Copy link
Contributor

bors commented May 5, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 5, 2022
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
.......... (60/63)
..        (63/63)


/checkout/src/test/rustdoc-gui/search-filter.goml search-filter... FAILED
[ERROR] (line 6) TimeoutError: waiting for selector "#titles" failed: timeout 30000ms exceeded: for command `wait-for: "#titles"`
Build completed unsuccessfully in 0:00:45

@m-ou-se
Copy link
Member Author

m-ou-se commented May 6, 2022

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 6, 2022
@bors
Copy link
Contributor

bors commented May 6, 2022

⌛ Testing commit 21c5f78 with merge 7f9e013...

@bors
Copy link
Contributor

bors commented May 6, 2022

☀️ Test successful - checks-actions
Approved by: Amanieu
Pushing 7f9e013 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 6, 2022
@bors bors merged commit 7f9e013 into rust-lang:master May 6, 2022
@rustbot rustbot added this to the 1.62.0 milestone May 6, 2022
@m-ou-se m-ou-se deleted the futex-bsd branch May 6, 2022 10:05
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7f9e013): comparison url.

Summary: This benchmark run did not return any relevant results.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-concurrency Area: Concurrency related issues. merged-by-bors This PR was explicitly merged by bors. O-dragonfly Operating system: DragonFly BSD O-freebsd Operating system: FreeBSD O-netbsd Operating system: NetBSD O-openbsd Operating system: OpenBSD S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants