Skip to content

Rust allocator and kvec improvements

Hui Zhu lkml rust-for-linux 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest2 patches 1 replyIn review
  2. v73 patches 5 repliesApplied
  3. v62 patches 8 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v52 patches4 repliesSuperseded
v42 patches2 repliesSuperseded
v32 patches2 repliesSuperseded

Changes in v8 from the cover letter

Updated according to the comments of David.

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2rust: alloc: add alignment tests for allocatorsrust/kernel/alloc/allocator.rs rust/kernel/alloc/kvec.rs+57 -11 reply
2/2rust: alloc: kvec: add doc example for as_slice methodrust/kernel/alloc/kvec.rs+10 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchKunwu ChanDavid GowAlice Ryhl
1/2R-b R-b
2/2R-b R-b R-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 3 reviewers.

Read the v8 thread

Cover letter [PATCH v8 0/2] Rust allocator and kvec improvements

From: Hui Zhu <[email protected]>

This series adds tests and docs for Rust kernel components:
Patch 1 adds KUnit tests for allocator alignment guarantees. and simplifies KVec test module naming convention. Patch 2 documents KVec::as_slice with a usage example.

Both patches are co-developed with Geliang Tang. Based on [1]. Tested on x86_64 using KUnit.

Changelog:
v8:
Updated according to the comments of David.
v7:
Updated according to the comments of Miguel.
v6:
According to the comments of Danilo, updated test for allocator.rs and allocator rebase onto [1].
v5:
According to the comments of Danilo, change to use generic struct and allocator Generics in allocator.rs.
v4:
According to the comments of, add the error check for push. v3:
According to the comments of Danilo and Boqun, move KVec test to doc example and move VBox to allocator unit tests.
v2:
According to the comments of Danilo, updated the commit to samples the usage of VBox and KVec.

[1] https://lore.kernel.org/lkml/[email protected]/

Hui Zhu (2):
rust: alloc: add alignment tests for allocators
rust: alloc: kvec: add doc example for as_slice method

 rust/kernel/alloc/allocator.rs | 56 ++++++++++++++++++++++++++++++++++
 rust/kernel/alloc/kvec.rs      | 12 +++++++-
 2 files changed, 67 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0