All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] BorrowedPage and PageOwner
@ 2025-08-06 20:50 Danilo Krummrich
  2025-08-06 20:50 ` [PATCH v2 1/6] rust: page: implement BorrowedPage Danilo Krummrich
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Danilo Krummrich @ 2025-08-06 20:50 UTC (permalink / raw)
  To: lorenzo.stoakes, vbabka, Liam.Howlett, urezki, ojeda, alex.gaynor,
	boqun.feng, gary, bjorn3_gh, lossin, a.hindborg, aliceryhl,
	tmgross, abdiel.janulgue, acourbot
  Cc: rust-for-linux, Danilo Krummrich

This patch series implements the BorrowedPage type and the PageOwner trait.

The latter can be implemented by any entity that potentially owns one or
multiple pages and allow users to borrow them.

For instance, this is useful to access and borrow the backing pages of
allocation primitives, such as Box and Vec, backing a scatterlist.

Hence, implement PageOwner for VBox and VVec.

Additionally, implement Vmalloc::to_page() and ArrayLayout::size(), which are
dependencies of the above.

Changes in v2:
  - BorrowedPage
    - Add link to Ownable
    - Use borrow_page() in the example
  - Add PageOwner, Vmalloc::to_page(), ArrayLayout, VBox, VVec patches.

Danilo Krummrich (6):
  rust: page: implement BorrowedPage
  rust: page: define PageOwner trait
  rust: alloc: vmalloc: implement Vmalloc::to_page()
  rust: alloc: layout: implement ArrayLayout::size()
  rust: alloc: kbox: implement PageOwner for VBox
  rust: alloc: kvec: implement PageOwner for VVec

 rust/bindings/bindings_helper.h |  1 +
 rust/kernel/alloc/allocator.rs  | 49 +++++++++++++++++++
 rust/kernel/alloc/kbox.rs       | 42 ++++++++++++++++
 rust/kernel/alloc/kvec.rs       | 40 +++++++++++++++
 rust/kernel/alloc/layout.rs     |  5 ++
 rust/kernel/page.rs             | 87 ++++++++++++++++++++++++++++++++-
 6 files changed, 223 insertions(+), 1 deletion(-)


base-commit: d2eedaa3909be9102d648a4a0a50ccf64f96c54f
-- 
2.50.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2025-08-08  9:38 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-06 20:50 [PATCH v2 0/6] BorrowedPage and PageOwner Danilo Krummrich
2025-08-06 20:50 ` [PATCH v2 1/6] rust: page: implement BorrowedPage Danilo Krummrich
2025-08-06 20:50 ` [PATCH v2 2/6] rust: page: define PageOwner trait Danilo Krummrich
2025-08-08  3:32   ` Alexandre Courbot
2025-08-08  8:54   ` Alice Ryhl
2025-08-08  9:08     ` Danilo Krummrich
2025-08-06 20:50 ` [PATCH v2 3/6] rust: alloc: vmalloc: implement Vmalloc::to_page() Danilo Krummrich
2025-08-08  3:37   ` Alexandre Courbot
2025-08-06 20:50 ` [PATCH v2 4/6] rust: alloc: layout: implement ArrayLayout::size() Danilo Krummrich
2025-08-08  3:42   ` Alexandre Courbot
2025-08-08  8:45   ` Abdiel Janulgue
2025-08-08  9:37   ` Alice Ryhl
2025-08-06 20:50 ` [PATCH v2 5/6] rust: alloc: kbox: implement PageOwner for VBox Danilo Krummrich
2025-08-08  3:49   ` Alexandre Courbot
2025-08-08  8:44   ` Abdiel Janulgue
2025-08-06 20:50 ` [PATCH v2 6/6] rust: alloc: kvec: implement PageOwner for VVec Danilo Krummrich
2025-08-08  3:54   ` Alexandre Courbot
2025-08-08  8:44   ` Abdiel Janulgue
2025-08-07  9:12 ` [PATCH v2 0/6] BorrowedPage and PageOwner Vlastimil Babka
2025-08-07  9:46   ` Danilo Krummrich
2025-08-08  8:41 ` Abdiel Janulgue

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.