Skip to content

Conversation

@jakepetroules
Copy link
Contributor

This fixes a regression introduced by #597, where the following line 3900ed4#diff-bd65cf12ed29b52c530ff04d2c678eb66883eddfcb44d5dbb8fe499f25865e93R219 presumably meant to use std::max instead of std::min.

The impact of this is that estimateTaskLimits falls back to a default case of returning only a single lane, regardless of the number of requested lanes, and consequently all builds are serialized.

Now, we simply return the value of _getmaxstdio directly. The documentation does not indicate that this function can fail or return a negative or zero value, and attempting to set the value with _setmaxstdio will terminate the process if given any value less than _IOB_ENTRIES (3).

Closes: #936

This fixes a regression introduced by #597, where the following line 3900ed4#diff-bd65cf12ed29b52c530ff04d2c678eb66883eddfcb44d5dbb8fe499f25865e93R219 presumably meant to use std::max instead of std::min.

The impact of this is that estimateTaskLimits falls back to a default case of returning only a single lane, regardless of the number of requested lanes, and consequently all builds are serialized.

Now, we simply return the value of _getmaxstdio directly. The documentation does not indicate that this function can fail or return a negative or zero value, and attempting to set the value with _setmaxstdio will terminate the process if given any value less than _IOB_ENTRIES (3).

Closes: #936
@jakepetroules
Copy link
Contributor Author

@swift-ci please test

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

Thank you!

@jakepetroules jakepetroules enabled auto-merge (rebase) September 5, 2024 19:27
@dmbryson
Copy link
Contributor

dmbryson commented Sep 5, 2024

@swift-ci please smoke test

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Builds are completely serialized on Windows

8 participants