Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

rtic-sync: No need for c-s to check if link is in wait queue if link is popped#1042

Open
datdenkikniet wants to merge3 commits intomaster
base:master
Choose a base branch
Loading
fromno-need-for-cs-if-popped

Conversation

datdenkikniet
Copy link
Contributor

@datdenkiknietdatdenkikniet commentedMar 18, 2025
edited
Loading

Minor improvement: if we insert our link into the wait queue, we always take a critical section (in theOnDrop) to ensure that it is no longer in the list on drop.

However, if our link is popped, we know for a fact that it is not in the list.take()-ing it in the block that gets us into that state saves us an unnecessary critical section, which is probably the 2nd-most common scenario (the 1st being finding a free slot immediately).

Additionally, we take a critical-section to check whether we still have an entry in ourSlotPtr. However, once we are certain that ourlink is removed from the list, we have exclusive access to it again: hence, we can skip that critical section too, on the happy path.

@datdenkiknietdatdenkikniet changed the titlertic-sync: No need for cs if wait-queue link is poppedrtic-sync: No need for c-s to check if link is in wait queue if link is poppedMar 18, 2025
@datdenkiknietdatdenkiknietforce-pushed theno-need-for-cs-if-popped branch 2 times, most recently fromd7c6df0 tod41a189CompareMarch 19, 2025 20:46
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@datdenkikniet

[8]ページ先頭

©2009-2025 Movatter.jp