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

v2.1: PrioritizationFeeCache: make update() never sleep on the sender channel (backport of #3813) #3818

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Nov 27, 2024

Avoid update() callers having to notify the service_loop() thread by doing an explicit sleep instead of sleeping on channel.recv() when the channel is empty. This avoids the case in which multiple replay/banking threads call update() at the same time and end up... sleeping themselves acquiring the mutex to notify the receiver.

Before and after

Screenshot 2024-11-28 at 12 26 28 am Screenshot 2024-11-28 at 12 27 04 am
This is an automatic backport of pull request #3813 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from a team as a code owner November 27, 2024 13:30
@alessandrod
Copy link

why backport: this is a fairly trivial change that's an easy win on the replay side, and especially if we increase CUs in 2.1 this saves even more time

@bw-solana bw-solana force-pushed the mergify/bp/v2.1/pr-3813 branch from 2a2121b to 6ff8908 Compare November 27, 2024 18:05
…el (#3813)

Avoid update() callers having to notify the service_loop() thread by
doing an explicit sleep instead of sleeping on channel.recv() when the
channel is empty. This avoids the case in which multiple replay/banking
threads call update() at the same time and end up... sleeping themselves
acquiring the mutex to notify the receiver.

(cherry picked from commit 53af223)
@alessandrod alessandrod force-pushed the mergify/bp/v2.1/pr-3813 branch from 6ff8908 to 99da6c5 Compare December 6, 2024 01:25
Copy link

@steviez steviez left a comment

Choose a reason for hiding this comment

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

Change is simple enough that I'm fine with it for BP so LGTM - merging on behalf of Alessandro so it makes it into today's release

@steviez steviez merged commit ad747c2 into v2.1 Dec 6, 2024
28 checks passed
@steviez steviez deleted the mergify/bp/v2.1/pr-3813 branch December 6, 2024 16:12
KirillLykov pushed a commit that referenced this pull request Dec 9, 2024
… channel (backport of #3813) (#3818)

PrioritizationFeeCache: make update() never sleep on the sender channel (#3813)

Avoid update() callers having to notify the service_loop() thread by
doing an explicit sleep instead of sleeping on channel.recv() when the
channel is empty. This avoids the case in which multiple replay/banking
threads call update() at the same time and end up... sleeping themselves
acquiring the mutex to notify the receiver.

(cherry picked from commit 53af223)

Co-authored-by: Alessandro Decina <[email protected]>
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