From: Xie Yuanbin <qq570070308@gmail.com>
To: riel@surriel.com, segher@kernel.crashing.org
Cc: acme@kernel.org, adrian.hunter@intel.com, agordeev@linux.ibm.com,
akpm@linux-foundation.org, alex@ghiti.fr,
alexander.shishkin@linux.intel.com, andreas@gaisler.com,
anna-maria@linutronix.de, aou@eecs.berkeley.edu,
borntraeger@linux.ibm.com, bp@alien8.de, bsegall@google.com,
dave.hansen@linux.intel.com, davem@davemloft.net,
david@redhat.com, dietmar.eggemann@arm.com, frederic@kernel.org,
gor@linux.ibm.com, hca@linux.ibm.com, hpa@zytor.com,
irogers@google.com, jolsa@kernel.org, juri.lelli@redhat.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org,
linux@armlinux.org.uk, lorenzo.stoakes@oracle.com,
luto@kernel.org, mark.rutland@arm.com,
mathieu.desnoyers@efficios.com, max.kellermann@ionos.com,
mgorman@suse.de, mingo@redhat.com, namhyung@kernel.org,
nysal@linux.ibm.com, palmer@dabbelt.com, paulmck@kernel.org,
peterz@infradead.org, pjw@kernel.org, qq570070308@gmail.com,
rostedt@goodmis.org, ryan.roberts@arm.com,
sparclinux@vger.kernel.org, svens@linux.ibm.com,
tglx@linutronix.de, thuth@redhat.com, urezki@gmail.com,
vincent.guittot@linaro.org, vschneid@redhat.com, will@kernel.org,
x86@kernel.org
Subject: Re: [PATCH 2/3] Provide and use an always inline version of finish_task_switch
Date: Sun, 26 Oct 2025 03:18:39 +0800 [thread overview]
Message-ID: <20251025191839.6907-1-qq570070308@gmail.com> (raw)
In-Reply-To: <18734a4944e47952b7ad3e10a36c902392bdaa91.camel@surriel.com>
On Fri, 24 Oct 2025 17:36:06 -0400, Rik van Riel wrote:
> Does that actually work, or does the compiler
> still inline some of those "non-inlined" versions,
> anyway?
For the current code, adding a new finish_task_switch_ainline function
and calling it has the same effect as directly changing the
finish_task_switch function attribute to __always_inline. This is because
there are only two references to the finish_task_switch function in
core.c. When one is inlined, the other becomes the only call point and it
must be inlined (unless the no-inline option/attribute is added or the
static attribute is removed). The uninlined finish_task_switch assembly
code will not exist.
However, if the call point of the finish_task_switch function in core.c is
increased in the future, as long as one point is added, a non inline
function will be generated and codesize revenue will be obtained.
Xie Yuanbin
next prev parent reply other threads:[~2025-10-25 19:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-24 18:26 [PATCH 0/3] Optimize code generation during context switching Xie Yuanbin
2025-10-24 18:26 ` [PATCH 1/3] Change enter_lazy_tlb to inline on x86 Xie Yuanbin
2025-10-24 20:14 ` Rik van Riel
2025-10-24 18:35 ` [PATCH 2/3] Provide and use an always inline version of finish_task_switch Xie Yuanbin
2025-10-24 18:35 ` [PATCH 3/3] Set the subfunctions called by finish_task_switch to be inline Xie Yuanbin
2025-10-24 19:44 ` Thomas Gleixner
2025-10-25 18:51 ` Xie Yuanbin
2025-10-24 21:36 ` [PATCH 2/3] Provide and use an always inline version of finish_task_switch Rik van Riel
2025-10-25 14:36 ` Segher Boessenkool
2025-10-25 17:37 ` [PATCH 0/3] Optimize code generation during context Xie Yuanbin
2025-10-29 10:26 ` David Hildenbrand
2025-10-30 15:04 ` Xie Yuanbin
2025-10-25 19:18 ` Xie Yuanbin [this message]
2025-10-25 12:26 ` [PATCH 0/3] Optimize code generation during context switching Peter Zijlstra
2025-10-25 18:20 ` [PATCH 0/3] Optimize code generation during context Xie Yuanbin
2025-10-27 15:21 ` Xie Yuanbin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251025191839.6907-1-qq570070308@gmail.com \
--to=qq570070308@gmail.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=alex@ghiti.fr \
--cc=alexander.shishkin@linux.intel.com \
--cc=andreas@gaisler.com \
--cc=anna-maria@linutronix.de \
--cc=aou@eecs.berkeley.edu \
--cc=borntraeger@linux.ibm.com \
--cc=bp@alien8.de \
--cc=bsegall@google.com \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=david@redhat.com \
--cc=dietmar.eggemann@arm.com \
--cc=frederic@kernel.org \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=hpa@zytor.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=juri.lelli@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lorenzo.stoakes@oracle.com \
--cc=luto@kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=max.kellermann@ionos.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=nysal@linux.ibm.com \
--cc=palmer@dabbelt.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=pjw@kernel.org \
--cc=riel@surriel.com \
--cc=rostedt@goodmis.org \
--cc=ryan.roberts@arm.com \
--cc=segher@kernel.crashing.org \
--cc=sparclinux@vger.kernel.org \
--cc=svens@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=thuth@redhat.com \
--cc=urezki@gmail.com \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=will@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox