rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] [PATCH 00/14] Rust atomic changes for v6.18
@ 2025-09-05  4:41 Boqun Feng
  2025-09-05  4:41 ` [PATCH 01/14] rust: Introduce atomic API helpers Boqun Feng
                   ` (14 more replies)
  0 siblings, 15 replies; 30+ messages in thread
From: Boqun Feng @ 2025-09-05  4:41 UTC (permalink / raw)
  To: rust-for-linux, linux-kernel, lkmm
  Cc: Will Deacon, Peter Zijlstra, Mark Rutland, Ingo Molnar,
	Thomas Gleixner, Paul E. McKenney, stern, Miguel Ojeda,
	alex.gaynor, Gary Guo, Björn Roy Baron, Benno Lossin,
	Alice Ryhl, Trevor Gross, Danilo Krummrich, Andreas Hindborg,
	Boqun Feng

Hi Will, Peter and Mark,

I'm sending this pull request containing Rust atomic changes to tip
tree. You can find the technical details below, but most importantly we
got a new reviewer for ATOMIC INFRASTRUCTURE that can help maintaining
the code. Welcome Gary!

Similar to other pull requests of myself to the tip tree, this pull
request is sent in form as patch series as well, in case that I missed
something and changes are needed in some patch.

Thanks!

The following changes since commit c17b750b3ad9f45f2b6f7e6f7f4679844244f0b9:

  Linux 6.17-rc2 (2025-08-17 15:22:10 -0700)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux.git/ tags/rust-atomic.2025.09.04a

for you to fetch changes up to f9bd1b3774be140762af2fec9c415b4a11746c48:

  MAINTAINERS: update atomic infrastructure entry to include Rust (2025-09-01 19:15:53 -0700)

----------------------------------------------------------------
Rust atomic changes for v6.18:

- Add initial support for generic LKMM atomic variables in Rust. This
  ensures Rust and C side are using the same memory model when
  communicating with each other, and would unblock a few more
  fine-grained concurrent core on Rust side.

- Add the wrapper for `refcount_t` in Rust. This avoids using customized
  reference counting solution on Rust side (e.g. in `block::mq`).
-----BEGIN PGP SIGNATURE-----

iQEzBAABCAAdFiEEj5IosQTPz8XU1wRHSXnow7UH+rgFAmi6YvwACgkQSXnow7UH
+rh/kgf+LruO9gn49QAzDE4T7kf9rP/z4ocie8sxMtED5J0vw12PAVa0UERQyB4m
756O0GSFKwESJMjLUifBslkt64k8x8hQ+XHYH/WPe/Rm7Ku4kf1zsTO9Mt0xA5qr
c5OgnLxR3T2L+1x8rEus8lPnExyX0G0b1/H1XjR+rvZAP1enwcLNyGFV3fNfAYNJ
cMpkGCMFM9wc5dpzDx89ttw49I8yuy+Cmf/eTtm1YDWQgzYVEycF8jTkFqYykIax
jMcZC0a1Lqrn1pLbxCZ5UEM9vxJREv46xBW6iKSkH5RWlbLo2gqMJbixYvkLtgBP
AbtrUtsyIx4Rw0nPEZ880Nce/LdhUw==
=Kuix
-----END PGP SIGNATURE-----

----------------------------------------------------------------
Boqun Feng (9):
      rust: Introduce atomic API helpers
      rust: sync: Add basic atomic operation mapping framework
      rust: sync: atomic: Add ordering annotation types
      rust: sync: atomic: Add generic atomics
      rust: sync: atomic: Add atomic {cmp,}xchg operations
      rust: sync: atomic: Add the framework of arithmetic operations
      rust: sync: atomic: Add Atomic<u{32,64}>
      rust: sync: atomic: Add Atomic<{usize,isize}>
      rust: sync: Add memory barriers

Gary Guo (5):
      rust: implement `kernel::sync::Refcount`
      rust: make `Arc::into_unique_or_drop` associated function
      rust: convert `Arc` to use `Refcount`
      rust: block: convert `block::mq` to use `Refcount`
      MAINTAINERS: update atomic infrastructure entry to include Rust

 MAINTAINERS                               |    6 +-
 rust/helpers/atomic.c                     | 1040 +++++++++++++++++++++++++++++
 rust/helpers/barrier.c                    |   18 +
 rust/helpers/helpers.c                    |    2 +
 rust/helpers/refcount.c                   |   10 +
 rust/kernel/block/mq/operations.rs        |    7 +-
 rust/kernel/block/mq/request.rs           |   73 +-
 rust/kernel/sync.rs                       |    4 +
 rust/kernel/sync/arc.rs                   |   55 +-
 rust/kernel/sync/atomic.rs                |  551 +++++++++++++++
 rust/kernel/sync/atomic/internal.rs       |  265 ++++++++
 rust/kernel/sync/atomic/ordering.rs       |  104 +++
 rust/kernel/sync/atomic/predefine.rs      |  169 +++++
 rust/kernel/sync/barrier.rs               |   61 ++
 rust/kernel/sync/refcount.rs              |  113 ++++
 scripts/atomic/gen-atomics.sh             |    1 +
 scripts/atomic/gen-rust-atomic-helpers.sh |   67 ++
 17 files changed, 2454 insertions(+), 92 deletions(-)
 create mode 100644 rust/helpers/atomic.c
 create mode 100644 rust/helpers/barrier.c
 create mode 100644 rust/kernel/sync/atomic.rs
 create mode 100644 rust/kernel/sync/atomic/internal.rs
 create mode 100644 rust/kernel/sync/atomic/ordering.rs
 create mode 100644 rust/kernel/sync/atomic/predefine.rs
 create mode 100644 rust/kernel/sync/barrier.rs
 create mode 100644 rust/kernel/sync/refcount.rs
 create mode 100755 scripts/atomic/gen-rust-atomic-helpers.sh

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

end of thread, other threads:[~2025-09-10  5:27 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-05  4:41 [GIT PULL] [PATCH 00/14] Rust atomic changes for v6.18 Boqun Feng
2025-09-05  4:41 ` [PATCH 01/14] rust: Introduce atomic API helpers Boqun Feng
2025-09-06  4:22   ` Elle Rhumsaa
2025-09-05  4:41 ` [PATCH 02/14] rust: sync: Add basic atomic operation mapping framework Boqun Feng
2025-09-06  4:22   ` Elle Rhumsaa
2025-09-05  4:41 ` [PATCH 03/14] rust: sync: atomic: Add ordering annotation types Boqun Feng
2025-09-06  4:22   ` Elle Rhumsaa
2025-09-05  4:41 ` [PATCH 04/14] rust: sync: atomic: Add generic atomics Boqun Feng
2025-09-06  4:23   ` Elle Rhumsaa
2025-09-05  4:41 ` [PATCH 05/14] rust: sync: atomic: Add atomic {cmp,}xchg operations Boqun Feng
2025-09-06  4:23   ` Elle Rhumsaa
2025-09-05  4:41 ` [PATCH 06/14] rust: sync: atomic: Add the framework of arithmetic operations Boqun Feng
2025-09-06  4:23   ` Elle Rhumsaa
2025-09-05  4:41 ` [PATCH 07/14] rust: sync: atomic: Add Atomic<u{32,64}> Boqun Feng
2025-09-06  4:24   ` Elle Rhumsaa
2025-09-05  4:41 ` [PATCH 08/14] rust: sync: atomic: Add Atomic<{usize,isize}> Boqun Feng
2025-09-06  4:24   ` Elle Rhumsaa
2025-09-05  4:41 ` [PATCH 09/14] rust: sync: Add memory barriers Boqun Feng
2025-09-06  4:25   ` Elle Rhumsaa
2025-09-05  4:41 ` [PATCH 10/14] rust: implement `kernel::sync::Refcount` Boqun Feng
2025-09-06  4:25   ` Elle Rhumsaa
2025-09-05  4:41 ` [PATCH 11/14] rust: make `Arc::into_unique_or_drop` associated function Boqun Feng
2025-09-06  4:25   ` Elle Rhumsaa
2025-09-05  4:41 ` [PATCH 12/14] rust: convert `Arc` to use `Refcount` Boqun Feng
2025-09-06  4:26   ` Elle Rhumsaa
2025-09-05  4:41 ` [PATCH 13/14] rust: block: convert `block::mq` " Boqun Feng
2025-09-06  4:26   ` Elle Rhumsaa
2025-09-05  4:41 ` [PATCH 14/14] MAINTAINERS: update atomic infrastructure entry to include Rust Boqun Feng
2025-09-06  4:26   ` Elle Rhumsaa
2025-09-10  5:27 ` [GIT PULL] [PATCH 00/14] Rust atomic changes for v6.18 Boqun Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).