public inbox for rcu@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] rust: sync: Atomic pointer and RCU
@ 2026-01-17 12:22 Boqun Feng
  2026-01-17 12:22 ` [PATCH 1/5] rust: helpers: Generify the definitions of rust_helper_*_{read,set}* Boqun Feng
                   ` (4 more replies)
  0 siblings, 5 replies; 20+ messages in thread
From: Boqun Feng @ 2026-01-17 12:22 UTC (permalink / raw)
  To: rust-for-linux, linux-kernel, rcu
  Cc: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Danilo Krummrich, Will Deacon, Peter Zijlstra, Mark Rutland,
	Paul E. McKenney, Frederic Weisbecker, Neeraj Upadhyay,
	Joel Fernandes, Josh Triplett, Uladzislau Rezki, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan, Zqiang, FUJITA Tomonori

Hi,

This is a respin of my previous RCU pointer patch [1]. RCU protected
pointers maps to a "struct foo __rcu *" on the C side, which although
RCU has its own API, but fundamentally it's a pointer that are operated
atomically, hence using Rust's atomic (pointer) API provides the
necessary atomic + ordering.

Although asynchronous reclaim is not in the current implementation, but
it should be easy to extend.

[1]: https://lore.kernel.org/rust-for-linux/20250421164221.1121805-13-boqun.feng@gmail.com/

Regards,
Boqun

Boqun Feng (5):
  rust: helpers: Generify the definitions of rust_helper_*_{read,set}*
  rust: helpers: Generify the definitions of rust_helper_*_xchg*
  rust: helpers: Generify the definitions of rust_helper_*_cmpxchg*
  rust: sync: atomic: Add Atomic<*mut T> support
  rust: sync: rcu: Add RCU protected pointer

 rust/helpers/atomic_ext.c            | 158 +++++--------
 rust/kernel/sync/atomic.rs           |  12 +-
 rust/kernel/sync/atomic/internal.rs  |  21 +-
 rust/kernel/sync/atomic/predefine.rs |  23 ++
 rust/kernel/sync/rcu.rs              | 326 ++++++++++++++++++++++++++-
 5 files changed, 427 insertions(+), 113 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2026-01-20 15:46 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-17 12:22 [PATCH 0/5] rust: sync: Atomic pointer and RCU Boqun Feng
2026-01-17 12:22 ` [PATCH 1/5] rust: helpers: Generify the definitions of rust_helper_*_{read,set}* Boqun Feng
2026-01-17 12:22 ` [PATCH 2/5] rust: helpers: Generify the definitions of rust_helper_*_xchg* Boqun Feng
2026-01-17 12:22 ` [PATCH 3/5] rust: helpers: Generify the definitions of rust_helper_*_cmpxchg* Boqun Feng
2026-01-17 12:22 ` [PATCH 4/5] rust: sync: atomic: Add Atomic<*mut T> support Boqun Feng
2026-01-17 17:03   ` Gary Guo
2026-01-18  4:19     ` Boqun Feng
2026-01-18 15:39       ` Gary Guo
2026-01-20 11:57         ` Boqun Feng
2026-01-20 12:37       ` Alice Ryhl
2026-01-20 14:07         ` Boqun Feng
2026-01-18  8:38   ` Dirk Behme
2026-01-18 14:57     ` Boqun Feng
2026-01-18 15:05       ` Boqun Feng
2026-01-18 19:59         ` Benno Lossin
2026-01-19  0:57           ` Boqun Feng
2026-01-19  3:09   ` FUJITA Tomonori
2026-01-17 12:22 ` [PATCH 5/5] rust: sync: rcu: Add RCU protected pointer Boqun Feng
2026-01-18  8:28   ` Dirk Behme
2026-01-19  1:03     ` Boqun Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox