[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251025185120.6760-1-qq570070308@gmail.com>
Date: Sun, 26 Oct 2025 02:51:20 +0800
From: Xie Yuanbin <qq570070308@...il.com>
To: tglx@...utronix.de
Cc: acme@...nel.org,
adrian.hunter@...el.com,
agordeev@...ux.ibm.com,
akpm@...ux-foundation.org,
alex@...ti.fr,
alexander.shishkin@...ux.intel.com,
andreas@...sler.com,
anna-maria@...utronix.de,
aou@...s.berkeley.edu,
borntraeger@...ux.ibm.com,
bp@...en8.de,
bsegall@...gle.com,
dave.hansen@...ux.intel.com,
davem@...emloft.net,
david@...hat.com,
dietmar.eggemann@....com,
frederic@...nel.org,
gor@...ux.ibm.com,
hca@...ux.ibm.com,
hpa@...or.com,
irogers@...gle.com,
jolsa@...nel.org,
juri.lelli@...hat.com,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org,
linux-riscv@...ts.infradead.org,
linux-s390@...r.kernel.org,
linux@...linux.org.uk,
lorenzo.stoakes@...cle.com,
luto@...nel.org,
mark.rutland@....com,
mathieu.desnoyers@...icios.com,
max.kellermann@...os.com,
mgorman@...e.de,
mingo@...hat.com,
namhyung@...nel.org,
nysal@...ux.ibm.com,
palmer@...belt.com,
paulmck@...nel.org,
peterz@...radead.org,
pjw@...nel.org,
qq570070308@...il.com,
riel@...riel.com,
rostedt@...dmis.org,
ryan.roberts@....com,
segher@...nel.crashing.org,
sparclinux@...r.kernel.org,
svens@...ux.ibm.com,
thuth@...hat.com,
urezki@...il.com,
vincent.guittot@...aro.org,
vschneid@...hat.com,
will@...nel.org,
x86@...nel.org
Subject: Re: [PATCH 3/3] Set the subfunctions called by finish_task_switch to be inline
On Fri, 24 Oct 2025 21:44:10 +0200, Thomas Gleixner wrote:
> What is exactly the point of this indirection. Why can't you just mark
> finish_arch_post_lock_switch() __always_inline and be done with it?
In this patch, I've added an always inline version of the function,
finish_arch_post_lock_switch_ainline. The original function,
finish_arch_post_lock_switch, retains its original inline attribute.
The reason for this is that this function is called not only during
context switches but also from other code, and I don't want to affect
those parts. In fact, with Os/Oz-level optimizations, if this function
is called multiple times within one .c file, it will most likely not be
inlined, even if it's marked as inline.
Context switching is a hot code, I hope it will be always inlined here to
improve performance. In other places, if it is not a performance-critical
function, then it can be not inlined to gain codesize benefits.
Look at your opinions. I have no objection to setting
finish_arch_post_lock_switch directly to __always_inline.
Xie Yuanbin
Powered by blists - more mailing lists