implement `kernel::sync::Refcount` and convert users
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest4 patches 15 repliesIn review
- v23 patches 6 repliesSuperseded
- v13 patches 33 repliesSuperseded
Changes in v3 from the cover letter
- Drop dec_not_one and revert to dec_and_test/set as the former
lacks acquire semantics.
- Move a use statement from patch 1 to correct place (patch 3).
- Update maintainer entry to include refcount.rs and add myself as a
reviewer, as suggested by Boqun.
- Link to v2: https://lore.kernel.org/rust-for-linux/[email protected]
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | rust: implement `kernel::sync::Refcount`rust/ rust/ rust/ | +98 | 4 replies | |
| 2/4 | rust: convert `Arc` to use `Refcount`rust/ | +26 | 6 replies | |
| 3/4 | rust: block: convert `block::mq` to use `Refcount`rust/ rust/ rust/ | +40 | 4 replies | |
| 4/4 | MAINTAINERS: update atomic infrastructure entry to include RustMAINTAINERS | +2 | 1 reply |
Reviews trailers per patch
3 of 4 patches have a Reviewed-by or Acked-by.
| Patch | Alice Ryhl | Boqun Feng | Andreas Hindborg | David Gow | Fiona Behrens |
|---|---|---|---|---|---|
| 1/4 | R-b | R-b | R-b | ||
| 2/4 | |||||
| 3/4 | A-b | T-b | |||
| 4/4 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.
Cover letter [PATCH v3 0/4] implement `kernel::sync::Refcount` and convert users
Currently there're two refcount usage in rust/, Arc and block::mq. Arc uses refcount_t with FFI calls directly, and block::mq use Rust atomics and custom refcounting.
This series consolidate them to have a single Refcount which wraps refcount_t and have it used by both.
With the removal of Rust AtomicU64 this would also make the code work for 32-bit systems. See [1] as a previous attempt to fix this issue.
Changes in v3:
- Drop dec_not_one and revert to dec_and_test/set as the former
lacks acquire semantics.
- Move a use statement from patch 1 to correct place (patch 3).
- Update maintainer entry to include refcount.rs and add myself as a
reviewer, as suggested by Boqun.
- Link to v2: https://lore.kernel.org/rust-for-linux/[email protected]
Changes in v2:
- Refcount::read method is dropped
- Refcount::dec_not_one method is added and Arc::into_unique_or_drop
is converted to use it.
- Link to v1: https://lore.kernel.org/rust-for-linux/[email protected]
Gary Guo (4):
rust: implement kernel::sync::Refcount
rust: convert Arc to use Refcount
rust: block: convert block::mq to use Refcount
MAINTAINERS: update atomic infrastructure entry to include Rust
MAINTAINERS | 2 + rust/helpers/refcount.c | 10 +++ rust/kernel/block/mq/operations.rs | 7 +- rust/kernel/block/mq/request.rs | 70 +++++++------------- rust/kernel/sync.rs | 2 + rust/kernel/sync/arc.rs | 65 ++++++++----------- rust/kernel/sync/refcount.rs | 100 +++++++++++++++++++++++++++++ 7 files changed, 166 insertions(+), 90 deletions(-) create mode 100644 rust/kernel/sync/refcount.rs
base-commit: beeb78d46249cab8b2b8359a2ce8fa5376b5ad2d
Signature · 1 line
2.47.2