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

Add group affinity #240

Merged
merged 7 commits into from
Dec 18, 2024
Merged

Conversation

Alan-Jowett
Copy link
Member

This pull request includes several changes to the usersim module, focusing on improving thread priority and affinity management. The changes involve replacing existing functions with new ones that cache thread priority and affinity to optimize performance.

Key Changes:

Thread Priority and Affinity Management:

  • Replaced usersim_set_affinity_and_priority_override and usersim_clear_affinity_and_priority_override with usersim_set_current_thread_priority and usersim_set_current_thread_affinity functions to manage thread priority and affinity more efficiently by caching values. [1] [2]
  • Introduced new thread-local variables to cache thread priority and affinity, replacing the previous override mechanism.
  • Updated various functions to use the new usersim_set_current_thread_priority and usersim_set_current_thread_affinity functions, ensuring thread priority and affinity are set only when necessary. [1] [2] [3] [4] [5] [6]

Code Cleanup:

  • Removed the old usersim_get_current_thread_group_affinity function and related affinity management functions that are no longer needed. [1] [2]

Tests:

  • Updated tests to reflect the removal of the old affinity and priority override functions and to validate the new behavior. [1] [2] [3]

Alan Jowett added 5 commits December 3, 2024 11:15
Signed-off-by: Alan Jowett <[email protected]>
Signed-off-by: Alan Jowett <[email protected]>
Signed-off-by: Alan Jowett <[email protected]>
Signed-off-by: Alan Jowett <[email protected]>
Signed-off-by: Alan Jowett <[email protected]>
Signed-off-by: Alan Jowett <[email protected]>
@Alan-Jowett Alan-Jowett merged commit ee55fba into microsoft:main Dec 18, 2024
9 checks passed
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.

2 participants