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

core/state: lock-free subfetcher #30782

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ARR4N
Copy link
Contributor

@ARR4N ARR4N commented Nov 21, 2024

Trie prefetching with a state.subfetcher previously relied on a pattern of {lock, set tasks, unlock, send void on wake channel}, which I've collapsed into a single channel send. This allows the lock to be removed entirely, which has an added benefit of avoiding future code forgetting to obtain it.

The new tasks channel is never closed, just like the old wake one wasn't. If that needs to be addressed I think it's best done in another PR.

I know that #30629 made significant allocation improvements and I don't want to inadvertently make things worse, but I can't find the benchmarks that were used there. Happy to run them if someone can please point me in the right direction.

See Go Blog: Share Memory By Communicating for background.

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.

1 participant