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

_rpmalloc_span_extract_free_list_deferred is not lock-free #325

Open
marcinwrochna opened this issue Feb 18, 2024 · 1 comment
Open

_rpmalloc_span_extract_free_list_deferred is not lock-free #325

marcinwrochna opened this issue Feb 18, 2024 · 1 comment
Assignees

Comments

@marcinwrochna
Copy link

The loop in _rpmalloc_deallocate_defer_small_or_medium and _rpmalloc_span_extract_free_list_deferred is a spin-lock as far as I understand. Any thread that's de-scheduled there (before free_list_deferred is restored) will block all other threads executing those functions indefinitely.

@mjansson
Copy link
Owner

mjansson commented Apr 1, 2024

That is true, and I changed that in the upcoming rewrite which I plan to release soon, where it is (in the allocation/free paths) proper lock free with guaranteed thread progress.

See https://github.com/mjansson/rpmalloc/tree/mjansson/rewrite branch for now

@mjansson mjansson self-assigned this Apr 1, 2024
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

No branches or pull requests

2 participants