-
Notifications
You must be signed in to change notification settings - Fork 43
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
Cancellation safety #47
Comments
Hi, thanks for your thoughtful questions and article.
I will deal with the above issues later. You are welcome to contribute if you are interested, Thank you! |
Let `event_listener` holds the `Arc`s of the `LocalMrInner`s that are being used by RDMA ops to ensure cancellation safety. `LocalMr` was replaced with New struct `LocalMrInner`. Because every struct that can use APIs should hold an `Arc` of the mr's metadata, but previous `LocalMr` can't hold itself. Fixes: datenlord#47
Let `event_listener` holds the `Arc`s of the `LocalMrInner`s that are being used by RDMA ops to ensure cancellation safety. `LocalMr` was replaced with New struct `LocalMrInner`. Because every struct that can use APIs should hold an `Arc` of the mr's metadata, but previous `LocalMr` can't hold itself. Fixes: datenlord#47
Let `event_listener` holds the `Arc`s of the `LocalMrInner`s that are being used by RDMA ops to ensure cancellation safety. `LocalMr` was replaced with New struct `LocalMrInner`. Because every struct that can use APIs should hold an `Arc` of the mr's metadata, but previous `LocalMr` can't hold itself. Fixes: datenlord#47
Let `event_listener` holds the `Arc`s of the `LocalMrInner`s that are being used by RDMA ops to ensure cancellation safety. `LocalMr` was replaced with New struct `LocalMrInner`. Because every struct that can use APIs should hold an `Arc` of the mr's metadata, but previous `LocalMr` can't hold itself. Fixes: datenlord#47 datenlord#56
Let `event_listener` holds the `Arc`s of the `LocalMrInner`s that are being used by RDMA ops to ensure cancellation safety. `LocalMr` was replaced with New struct `LocalMrInner`. Because every struct that can use APIs should hold an `Arc` of the mr's metadata, but previous `LocalMr` can't hold itself. Fixes: datenlord#47 datenlord#56
Let `event_listener` holds the `Arc`s of the `LocalMrInner`s that are being used by RDMA ops to ensure cancellation safety. `LocalMr` was replaced with New struct `LocalMrInner`. Because every struct that can use APIs should hold an `Arc` of the mr's metadata, but previous `LocalMr` can't hold itself. Add `MrState` to avoid potential race condition When the RDMA operations future were canceled but the related mr is still being used by netdev or kernel. This is a potential race condition. So we add `MrState` to `LocalMrInner`, to make sure we can get slice or mutable slice only if the mr is readable or writeable. Fixes: datenlord#47 datenlord#56
Let `event_listener` holds the `Arc`s of the `LocalMrInner`s that are being used by RDMA ops to ensure cancellation safety. `LocalMr` was replaced with New struct `LocalMrInner`. Because every struct that can use APIs should hold an `Arc` of the mr's metadata, but previous `LocalMr` can't hold itself. Add `RwLock` to avoid potential race condition When the RDMA operations future were canceled but the related mr is still being used by netdev or kernel. This is a potential race condition. So we add `Rwlock` to `LocalMrInner`, to make sure we can get slice or mutable slice only if the mr is readable or writeable. Replace hashmap to reduce time overhead and ensure guards drop after remove immediately to unlock the rwlock.`std::collections::HashMap` has less time overhead than `LockFreeCuckooHash` in the low concurrency situation. `LockFreeCuckooHash` can't drop guards immediately after remove them and that led to a deadlock. Add some unchecked methods without lock, which should be put into unsafe trait later. Integrate common `HashMap` methods in hashmap_utilities. Fixes: datenlord#47 datenlord#56
Let `event_listener` holds the `Arc`s of the `LocalMrInner`s that are being used by RDMA ops to ensure cancellation safety. `LocalMr` was replaced with New struct `LocalMrInner`. Because every struct that can use APIs should hold an `Arc` of the mr's metadata, but previous `LocalMr` can't hold itself. Add `RwLock` to avoid potential race condition When the RDMA operations future were canceled but the related mr is still being used by netdev or kernel. This is a potential race condition. So we add `Rwlock` to `LocalMrInner`, to make sure we can get slice or mutable slice only if the mr is readable or writeable. Replace hashmap to reduce time overhead and ensure guards drop after remove immediately to unlock the rwlock.`std::collections::HashMap` has less time overhead than `LockFreeCuckooHash` in the low concurrency situation. `LockFreeCuckooHash` can't drop guards immediately after remove them and that led to a deadlock. Add some unchecked methods without lock, which should be put into unsafe trait later. Integrate common `HashMap` methods in hashmap_utilities. Fixes: #47 #56
Disclaimer: I know nothing about the details of RDMA before.
I have some questions about the example at first glance.
async-rdma/examples/rpc.rs
Lines 44 to 57 in 2a55f32
sync_with_client
is dropped (cancelled) before the request completes?Related article: https://zhuanlan.zhihu.com/p/346219893
The text was updated successfully, but these errors were encountered: