Re: [PATCH v2 3/4] Provide the always inline version of some functions

Peter Zijlstra
2025-11-09T11:51:56Z

On Sat, Nov 08, 2025 at 02:14:44PM -0800, H. Peter Anvin wrote:

> >+static struct rq *finish_task_switch(struct task_struct *prev)
> >+{
> >+ return finish_task_switch_ainline(prev);
> >+}
> >+
> > /**
> > * schedule_tail - first thing a freshly forked thread must call.
> > * @prev: the thread we just switched away from.
>
> There is, in fact: you have to have an always_inline version, and wrap it in a noinline version.

Yes, but all of this is particularly retarded, there are exactly _2_
callers of this function. Keeping an out-of-line copy for one while
inlineing the other makes 0 sense.

Also, the amount of crap he needs to mark __always_inline doesn't make
much sense to me, is he building with -Os or something?