From: Boqun Feng <boqun.feng@gmail.com>
To: FUJITA Tomonori <fujita.tomonori@gmail.com>
Cc: ojeda@kernel.org, a.hindborg@kernel.org, aliceryhl@google.com,
bjorn3_gh@protonmail.com, dakr@kernel.org, gary@garyguo.net,
lossin@kernel.org, tmgross@umich.edu, acourbot@nvidia.com,
rust-for-linux@vger.kernel.org, linux-arch@vger.kernel.org
Subject: Re: [PATCH v1 2/3] rust: sync: atomic: Remove workaround macro for i8/i16 BasicOps
Date: Mon, 29 Dec 2025 21:19:27 +0800 [thread overview]
Message-ID: <aVJ_35voSG8xnUk-@tardis-2.local> (raw)
In-Reply-To: <20251229.215558.697746619121630518.fujita.tomonori@gmail.com>
On Mon, Dec 29, 2025 at 09:55:58PM +0900, FUJITA Tomonori wrote:
> On Mon, 29 Dec 2025 19:58:48 +0800
> Boqun Feng <boqun.feng@gmail.com> wrote:
>
> > On Sun, Dec 28, 2025 at 09:05:45PM +0900, FUJITA Tomonori wrote:
> >> Remove workaround impl_atomic_only_load_and_store_ops macro and use
> >> declare_and_impl_atomic_methods to add AtomicBasicOps support for
> >> i8/i16.
> >>
> >
> > I did the following so that we can drop this ;-)
> >
> > 1. Change function names of [1] and [2] from *{load,store}* to
> > *{read,set}*.
> >
> > 2. Reorder [3] before [4] to avoid introduction of
> > impl_atomic_only_load_and_store_ops!()
> >
> > [1]: https://lore.kernel.org/all/20251211113826.1299077-3-fujita.tomonori@gmail.com/
> > [2]: https://lore.kernel.org/all/20251211113826.1299077-2-fujita.tomonori@gmail.com/
> > [3]: https://lore.kernel.org/all/20251228120546.1602275-2-fujita.tomonori@gmail.com/
> > [4]: https://lore.kernel.org/all/20251211113826.1299077-4-fujita.tomonori@gmail.com/
> >
> > I also reorder a bit to make the introduction of helpers are grouped
> > together, please see at
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux.git/log/?h=rust-sync.20251229
> >
> > I feel this way we have a cleaner history of changes.
>
> It looks much cleaner now, thanks!
>
> Maybe, you could consider chan ging the following two points:
>
> - change the first patch subject
>
> rust: helpers: Add i8/i16 atomic_read_acquire/atomic_set_release helpers
>
> - drop the following comment in 12th patch:
>
> +// It is still unclear whether i8/i16 atomics will eventually support
> +// the same set of operations as i32/i64, because some architectures
> +// do not provide hardware support for the required atomic primitives.
> +// Furthermore, supporting Atomic<bool> will require even more
> +// significant structural changes.
> +//
> +// To avoid premature refactoring, a separate macro for i8 and i16 is
> +// used for now, leaving the existing macros untouched until the overall
> +// design requirements are settled.
>
Good eyes!
Done (along with other fixes):
https://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux.git/log/?h=rust-sync.20251229b
Regards,
Boqun
next prev parent reply other threads:[~2025-12-29 13:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-28 12:05 [PATCH v1 0/3] rust: Add xchg and cmpxchg support on i8/i16 FUJITA Tomonori
2025-12-28 12:05 ` [PATCH v1 1/3] rust: sync: atomic: Prepare AtomicOps macros for i8/i16 support FUJITA Tomonori
2025-12-29 11:13 ` Boqun Feng
2025-12-29 11:54 ` FUJITA Tomonori
2025-12-29 16:36 ` Gary Guo
2025-12-30 0:17 ` Boqun Feng
2026-01-02 11:25 ` Gary Guo
2025-12-28 12:05 ` [PATCH v1 2/3] rust: sync: atomic: Remove workaround macro for i8/i16 BasicOps FUJITA Tomonori
2025-12-29 11:58 ` Boqun Feng
2025-12-29 12:55 ` FUJITA Tomonori
2025-12-29 13:19 ` Boqun Feng [this message]
2025-12-28 12:05 ` [PATCH v1 3/3] rust: sync: atomic: Add i8/i16 xchg and cmpxchg support FUJITA Tomonori
2025-12-29 12:27 ` Boqun Feng
2025-12-29 12:30 ` Boqun Feng
2025-12-29 13:04 ` FUJITA Tomonori
2025-12-29 13:13 ` Boqun Feng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aVJ_35voSG8xnUk-@tardis-2.local \
--to=boqun.feng@gmail.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=dakr@kernel.org \
--cc=fujita.tomonori@gmail.com \
--cc=gary@garyguo.net \
--cc=linux-arch@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox