[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: [WIP 0/3] Memory model and atomic API in Rust
From:       Peter Zijlstra <peterz () infradead ! org>
Date:       2024-04-09 10:50:15
Message-ID: 20240409105015.GC21779 () noisy ! programming ! kicks-ass ! net
[Download RAW message or body]

On Mon, Mar 25, 2024 at 01:59:55PM -0700, Boqun Feng wrote:
> On Mon, Mar 25, 2024 at 10:44:45AM +0000, Mark Rutland wrote:
> [...]
> > > 
> > > * I choose to re-implement atomics in Rust `asm` because we are still
> > >   figuring out how we can make it easy and maintainable for Rust to call
> > >   a C function _inlinely_ (Gary makes some progress [2]). Otherwise,
> > >   atomic primitives would be function calls, and that can be performance
> > >   bottleneck in a few cases.
> > 
> > I don't think we want to maintain two copies of each architecture's atomics.
> > This gets painful very quickly (e.g. as arm64's atomics get patched between
> > LL/SC and LSE forms).
> > 
> 
> No argument here ;-)

Didn't we talk about bindgen being able to convert inline C functions
into equivalent inline Rust functions? ISTR that getting stuck on Rust
not having a useful inline asm.

But fixing all that in a hurry seems like the much saner path forward.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic