Skip to content

[OpenMP] Improve performance of ticket lock (x86) #143557

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jpeyton52
Copy link
Contributor

Ticket lock has a yield operation which degrades performance on larger server machines due to an unconditional pause operation.

Ticket lock has a yield operation which degrades performance on larger
server machines due to an unconditional pause operation.
@llvmbot llvmbot added the openmp:libomp OpenMP host runtime label Jun 10, 2025
@@ -720,8 +720,6 @@ int __kmp_release_ticket_lock(kmp_ticket_lock_t *lck, kmp_int32 gtid) {
std::atomic_fetch_add_explicit(&lck->lk.now_serving, 1U,
std::memory_order_release);

KMP_YIELD(distance >
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also remove line 715--718?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openmp:libomp OpenMP host runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants