From: Yonghong Song <yonghong.song@linux.dev>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>, Song Liu <song@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: clang thin-lto not working for aarch64 for v6.13
Date: Sun, 26 Jan 2025 19:48:06 -0800 [thread overview]
Message-ID: <5ec75c39-2878-4caa-8fbd-68cf0aee28de@linux.dev> (raw)
Hi, Masahiro,
We are trying 6.13 kernel and found that for aarch64 thinlto not
working. For example, for kernel/bpf/syscall.o, the compilation flags
from .syscall.o.cmd are savedcmd_kernel/bpf/syscall.o := clang
-Wp,-MMD,kernel/bpf/.syscall.o.d ... -D__KBUILD_MODNAME=kmod_syscall -c
-o kernel/bpf/syscall.o kernel/bpf/syscall.c ; ld.lld -EL -maarch64elf
-z norelro -mllvm -import-instr-limit=5 -z noexecstack -r -o
kernel/bpf/.tmp_syscall.o kernel/bpf/syscall.o; mv
kernel/bpf/.tmp_syscall.o kernel/bpf/syscall.o I did some bisecting and
found the issue is due to ``` commit
bede169618c68379e1be7ace14e8ac85b964a9ec Author: Masahiro Yamada
<masahiroy@kernel.org> Date: Thu Nov 14 08:45:22 2024 +0900 kbuild:
enable objtool for *.mod.o and additional kernel objects ``` In the
above, for thinlto, we should not do ld.lld as compiler needs IR to do
cross-file inlining. Searching the internet, I found that the issue has
been reported e.g. in
https://patchwork.kernel.org/project/linux-kbuild/patch/20241113234526.402738-3-masahiroy@kernel.org/
and you mentioned you will fix it. Do you have a fix somewhere? With
this fix, deploying 6.13 in our production will cause performance
regression and that is not what we want. Thanks! Yonghong
next reply other threads:[~2025-01-27 3:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-27 3:48 Yonghong Song [this message]
2025-01-27 17:50 ` clang thin-lto not working for aarch64 for v6.13 Song Liu
2025-01-29 23:04 ` Song Liu
2025-01-29 23:22 ` Nathan Chancellor
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=5ec75c39-2878-4caa-8fbd-68cf0aee28de@linux.dev \
--to=yonghong.song@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=song@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