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

Update crossbeam-channel to avoid spinning in waker #13815

Closed
sticnarf opened this issue Nov 17, 2022 · 0 comments · Fixed by #13807
Closed

Update crossbeam-channel to avoid spinning in waker #13815

sticnarf opened this issue Nov 17, 2022 · 0 comments · Fixed by #13807
Labels
type/enhancement Type: Issue - Enhancement

Comments

@sticnarf
Copy link
Contributor

Development Task

Per crossbeam-rs/crossbeam#835, spinning in the waker is probably a bad idea because the critical section includes allocation. So, the spinlock may be more expensive than a system futex.

In a sysbench oltp_index workload, channel sending occupies 5.8% CPU.
update-index

@sticnarf sticnarf added the type/enhancement Type: Issue - Enhancement label Nov 17, 2022
ti-chi-bot added a commit that referenced this issue Nov 17, 2022
close #13815

According to crossbeam-rs/crossbeam#835, spinning at the
sending side is probably a bad idea because of large critical section and it's
fixed in the recent version.

This commit updates crossbeam-channel. It will reduce CPU usage a bit and
improve performance.

Signed-off-by: Yilin Chen <sticnarf@gmail.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Type: Issue - Enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant