Skip to content

Futex should operate on the &AtomicI32, not the &Arc#2866

Merged
stevenengler merged 1 commit intoshadow:mainfrom
stevenengler:fix-scheduler-futex
Apr 12, 2023
Merged

Futex should operate on the &AtomicI32, not the &Arc#2866
stevenengler merged 1 commit intoshadow:mainfrom
stevenengler:fix-scheduler-futex

Conversation

@stevenengler
Copy link
Copy Markdown
Contributor

@stevenengler stevenengler commented Apr 12, 2023

The latest nightly tor benchmark showed a huge runtime performance change:

run_time

@sporksmith found that we were performing futex operations on the Arc address rather than its inner AtomicI32 address, causing the waiter to spin. This was caused by a bug in #2846.

We expect that this PR will increase the runtime back to the original runtime, and we can investigate spinning properly later.

This bug caused the waiter to spin rather than futex-wait.
@stevenengler stevenengler requested a review from sporksmith April 12, 2023 16:09
@stevenengler stevenengler self-assigned this Apr 12, 2023
@github-actions github-actions bot added the Component: Main Composing the core Shadow executable label Apr 12, 2023
@stevenengler stevenengler enabled auto-merge April 12, 2023 16:13
@stevenengler stevenengler merged commit 5e93e78 into shadow:main Apr 12, 2023
@stevenengler stevenengler deleted the fix-scheduler-futex branch April 12, 2023 16:30
@stevenengler
Copy link
Copy Markdown
Contributor Author

The nightly benchmark after fixing this bug:

run_time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Main Composing the core Shadow executable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants