On Tue, Jul 22, 2025 at 06:47:36PM -0400, Steven Rostedt wrote:
> On Tue, 22 Jul 2025 15:34:52 -0700
> "Paul E. McKenney" <paul...@kernel.org> wrote:
> 
> > > > +static inline struct srcu_ctr __percpu 
> > > > *srcu_read_lock_fast_notrace(struct srcu_struct *ssp)
> > > > +       __acquires(ssp)  
> > > 
> > > Should these also be marked with 'notrace' attribute?
> > > 
> > > I am not sure what the precedent is, I do see a few examples of 'notrace' 
> > > and
> > > 'inline' in the same function signature though.  
> > 
> > Heh!!!
> > 
> > There are six instance of static-inline notrace functions, and eight
> > instances of static-inline non-notrace functions whose names contain
> > "_notrace", not counting the srcu_read_lock_fast_notrace() and
> > srcu_read_unlock_fast() functions currently under review.
> > 
> > My guess is that I should add "notrace" to handle the possible case
> > where the compiler declines to inline this function.  I will do this
> > on the next rebase unless I hear otherwise.
> > 
> > Steven, Mathieu, thoughts?
> 
> If you add "__always_inline" then it will include "notrace" as inlined
> functions are not traced. But we have removed "notrace" from the generic
> "inline" a while ago. If the compiler decides to ignore an "inline" it
> *will* be traced.
> 
> We probably should fix any "_notrace" functions that are not
> "__always_inline" and do not have "notrace".

Very good, and thank you!

On my next rebase, I will add "notrace" to srcu_read_lock_fast_notrace(),
srcu_read_unlock_fast_notrace(), __srcu_read_lock_fast(), and
__srcu_read_unlock_fast(), all of which are currently just static
inline.

                                                        Thanx, Paul

Reply via email to