Skip to content

Conversation

@marcphilipp
Copy link
Member

@marcphilipp marcphilipp commented Sep 19, 2024

This allows tasks with only read locks to be stolen by threads that are
currently holding only read locks.

This allows tasks with only read locks to be stolen by threads that are
currently holding only read locks. The new compatibility check would
also support write locks but `NodeTreeWalker` forces children of tasks
with write locks to be executed on the same thread and thus no work is
being stolen.
@marcphilipp marcphilipp self-assigned this Sep 19, 2024
@marcphilipp marcphilipp added this to the 5.10.4 milestone Sep 19, 2024
@marcphilipp
Copy link
Member Author

Actually, I think we can get rid of the special types for the global locks now. I'll add that to this PR before merging.

@marcphilipp marcphilipp marked this pull request as draft September 19, 2024 11:53
@marcphilipp marcphilipp marked this pull request as ready for review September 19, 2024 12:36
@marcphilipp marcphilipp force-pushed the marc/lock-compatibility-checking branch from 9edf0e0 to 1fb9268 Compare September 19, 2024 12:59
@marcphilipp marcphilipp modified the milestones: 5.10.4, 5.11.1 Sep 19, 2024
Copy link
Contributor

@leonard84 leonard84 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 looks good. Only some test suggestions and style bikeshedding left.

@marcphilipp marcphilipp changed the title Allow work stealing when more locks can be acquired without deadlock Allow for work stealing when only holding read locks Sep 20, 2024
@marcphilipp marcphilipp merged commit ebbf134 into main Sep 21, 2024
@marcphilipp marcphilipp deleted the marc/lock-compatibility-checking branch September 21, 2024 08:58
marcphilipp added a commit that referenced this pull request Sep 21, 2024
This allows tasks with only read locks to be stolen by threads that are
currently holding only read locks.

---------

Co-authored-by: Leonard Brünings <[email protected]>
marcphilipp added a commit that referenced this pull request Sep 23, 2024
This allows tasks with only read locks to be stolen by threads that are
currently holding only read locks.

---------

Co-authored-by: Leonard Brünings <[email protected]>
(cherry picked from commit ebbf134)
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.

3 participants