Re: [PATCH v2] rust: sync: optimize rust symbol generation for CondVar

Boqun Feng
2025-03-24T16:49:35Z

On Mon, Mar 24, 2025 at 10:37:38AM +0100, Miguel Ojeda wrote:
> On Mon, Mar 24, 2025 at 7:19 AM Kunwu Chan <kunwu.chan@linux.dev> wrote:
> >
> > Link: https://github.com/Rust-for-Linux/linux/issues/1145
> > Suggested-by: Alice Ryhl <aliceryhl@google.com>
>
> Nit: I typically use Link after Suggested-by, to mimic what the docs
> require about Reported-by with Link. (No need to resend a new version
> just for this :)
>
> > - Remove '#[inline]' for notify()
>
> It is good that the commit matches the log now, though I wonder if in
> the future we may want the `#[inline]` for `notify` anyway, even if
> LLVM does that one on its own today.
>

IMO, inlining should be mostly decided by compilers instead of
programmers, so if we don't have evidences that compilers need some
guidance, we shouldn't introduce the `#[inline]` attribute.

Maybe Kunwu has an example saying otherwise?

Regards,
Boqun

> Cheers,
> Miguel