Skip to content

rust: page: Add support for existing struct page mappings

Abdiel Janulgue linux-mm lkml rust-for-linux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest2 patches 30 repliesIn review

Changes in v3 from the cover letter

- Use Owned and Ownable types for constructing Page as suggested in
instad of using ptr::read().
- Link to v1: https://lore.kernel.org/rust-for-linux/[email protected]/

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2rust: page: use the page's reference count to decide when to free the allocationrust/bindings/bindings_helper.h rust/helpers/page.c rust/kernel/page.rs+36 -133 replies
2/2rust: page: Extend support to existing struct page mappingsrust/helpers/page.c rust/kernel/page.rs+106 -17 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/2] rust: page: Add support for existing struct page mappings

This series aims to add support for pages that are not constructed by an instance of the rust Page abstraction, for example those returned by vmalloc_to_page() or virt_to_page().

Changes sinve v3:
- Use the struct page's reference count to decide when to free the
allocation (Alice Ryhl, Boqun Feng).
- Make Page::page_slice_to_page handle virt_to_page cases as well
(Danilo Krummrich).
- Link to v2: https://lore.kernel.org/lkml/[email protected]/

Changes since v2:
- Use Owned and Ownable types for constructing Page as suggested in
instad of using ptr::read().
- Link to v1: https://lore.kernel.org/rust-for-linux/[email protected]/

Abdiel Janulgue (2):
rust: page: use the page's reference count to decide when to free the
allocation
rust: page: Extend support to existing struct page mappings

 rust/bindings/bindings_helper.h |   1 +
 rust/helpers/page.c             |  20 +++++
 rust/kernel/page.rs             | 135 ++++++++++++++++++++++++++++----
 3 files changed, 142 insertions(+), 14 deletions(-)

base-commit: b2603f8ac8217bc59f5c7f248ac248423b9b99cb

Signature · 1 line
2.43.0