[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250227092949.137a39e9@gandalf.local.home>
Date: Thu, 27 Feb 2025 09:29:49 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Martin Uecker <uecker@...raz.at>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>, Ralf Jung
<post@...fj.de>, "Paul E. McKenney" <paulmck@...nel.org>, Alice Ryhl
<aliceryhl@...gle.com>, Ventura Jack <venturajack85@...il.com>, Kent
Overstreet <kent.overstreet@...ux.dev>, Gary Guo <gary@...yguo.net>,
airlied@...il.com, boqun.feng@...il.com, david.laight.linux@...il.com,
ej@...i.de, gregkh@...uxfoundation.org, hch@...radead.org, hpa@...or.com,
ksummit@...ts.linux.dev, linux-kernel@...r.kernel.org,
miguel.ojeda.sandonis@...il.com, rust-for-linux@...r.kernel.org
Subject: Re: C aggregate passing (Rust kernel policy)
On Thu, 27 Feb 2025 07:56:47 +0100
Martin Uecker <uecker@...raz.at> wrote:
> Observable is I/O and volatile accesses. These are things considered
> observable from the outside of a process and the only things an
> optimizer has to preserve.
>
> Visibility is related to when stores are visible to other threads of
> the same process. But this is just an internal concept to give
> evaluation of expressions semantics in a multi-threaded
> program when objects are accessed from different threads. But
> the compiler is free to change any aspect of it, as long as the
> observable behavior stays the same.
>
> In practice the difference is not so big for a traditional
> optimizer that only has a limited local view and where
> "another thread" is basically part of the "outside world".
So basically you are saying that if the compiler has access to the entire
program (sees the use cases for variables in all threads) that it can
determine what is visible to other threads and what is not, and optimize
accordingly?
Like LTO in the kernel?
-- Steve
Powered by blists - more mailing lists