[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <128b82ff-d304-41d6-b914-a44706d8781f@zytor.com>
Date: Mon, 10 Nov 2025 15:21:52 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Xie Yuanbin <qq570070308@...il.com>, david@...hat.com, tglx@...utronix.de,
segher@...nel.crashing.org, riel@...riel.com, linux@...linux.org.uk,
mathieu.desnoyers@...icios.com, paulmck@...nel.org, pjw@...nel.org,
palmer@...belt.com, aou@...s.berkeley.edu, alex@...ti.fr,
hca@...ux.ibm.com, gor@...ux.ibm.com, agordeev@...ux.ibm.com,
borntraeger@...ux.ibm.com, svens@...ux.ibm.com, davem@...emloft.net,
andreas@...sler.com, luto@...nel.org, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, acme@...nel.org, namhyung@...nel.org,
mark.rutland@....com, alexander.shishkin@...ux.intel.com,
jolsa@...nel.org, irogers@...gle.com, adrian.hunter@...el.com,
james.clark@...aro.org, anna-maria@...utronix.de, frederic@...nel.org,
juri.lelli@...hat.com, vincent.guittot@...aro.org,
dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
mgorman@...e.de, vschneid@...hat.com, nathan@...nel.org,
nick.desaulniers+lkml@...il.com, morbo@...gle.com,
justinstitt@...gle.com, thuth@...hat.com, brauner@...nel.org,
arnd@...db.de, jlayton@...nel.org, aalbersh@...hat.com,
akpm@...ux-foundation.org, david@...nel.org,
lorenzo.stoakes@...cle.com, max.kellermann@...os.com,
ryan.roberts@....com, nysal@...ux.ibm.com, urezki@...il.com,
x86@...nel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org,
linux-s390@...r.kernel.org, sparclinux@...r.kernel.org,
linux-perf-users@...r.kernel.org, llvm@...ts.linux.dev,
will@...nel.org
Subject: Re: [PATCH v2 3/4] Provide the always inline version of some
functions
On 2025-11-09 03:51, Peter Zijlstra wrote:
> 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?
That's another issue -- unless the second instance of the function is on a
slow path which wants to be isolated from the rest of its function (unlikely.)
I was merely commenting on the claim that there is no way to control inlining
on a call site basis - there is.
-hpa
Powered by blists - more mailing lists