From: "Wentao Guan" <guanwentao@uniontech.com>
To: "Petr Pavlu" <petr.pavlu@suse.com>
Cc: linux-kbuild <linux-kbuild@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-modules <linux-modules@vger.kernel.org>,
masahiroy <masahiroy@kernel.org>
Subject: Re: [PATCH v2] genksyms: Support arm64 CRC32 hardware acceleration1~
Date: Wed, 27 May 2026 03:13:27 +0800 [thread overview]
Message-ID: <tencent_2FA16E0A18D6D0C0703F5D49@qq.com> (raw)
In-Reply-To: <c135351a-d7cc-467b-a0c0-bea735fe850a@suse.com>
Hello Petr,
> On 5/25/26 3:41 PM, Wentao Guan wrote:
> >> On 5/25/26 10:02 AM, Wentao Guan wrote:
> >>>> Additionally, many distributions already switched to gendwarfksyms last
> >>>> year. Unless someone provides a good reason to keep genksyms around,
> >>>> I expect it will be deprecated soon and eventually removed. It would be
> >>>> more valuable to show whether the same optimization is worthwhile for
> >>>> gendwarfksyms.
> >>> I see gendwarfksyms use crc32 from <zlib.h>, which from zlib1g-dev and zlib1g.
> >>
> >> Ah, I forgot about this, so gendwarfksyms should already be well
> >> optimized. I think that is the most important thing.
> >
> > Which way do you prefer? There are two ways now:
> > 1. this work,
> > 2. import zlib like gendwarfksyms and remove the huge crctab,
> > but need make sure any arch do not cause performance regression?
> > (Assert the user libs precompile with +crc32 is right?)
> > I do some early tests show that:
> > 1) zlib in x86 fast than genksym software
> > 2) zlib in arm64 debian precompile slow than genksym software(crc32 not in armv8)
> > 3) zlib in arm64 recompile with +crc32 same speed with genksyms hardware
>
> I think it would be useful to first have more data showing that the CRC
> calculation in genksyms is a hot path and contributes significantly to
> the overall kernel build time.
I found that 'nm' is slow and a really crazy but significantly improve my build speed,
from 11m50s down to 11m18s:
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 0c838c467..d5b9db6d3 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -231,7 +231,7 @@ ifdef CONFIG_MODVERSIONS
# be compiled and linked to the kernel and/or modules.
gen_symversions = \
- if $(NM) $@ 2>/dev/null | grep -q ' __export_symbol_'; then \
+ if strings $@ 2>/dev/null | grep -q '__export_symbol_'; then \
$(cmd_gensymtypes_$1) >> $(dot-target).cmd; \
fi
BRs
Wentao Guan
next prev parent reply other threads:[~2026-05-26 19:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-25 7:03 [PATCH v2] genksyms: Support arm64 CRC32 hardware acceleration Wentao Guan
2026-05-25 7:50 ` Petr Pavlu
2026-05-25 8:02 ` [PATCH v2] genksyms: Support arm64 CRC32 hardware acceleration1~ Wentao Guan
2026-05-25 9:09 ` Petr Pavlu
2026-05-25 13:41 ` Wentao Guan
2026-05-25 17:33 ` Petr Pavlu
2026-05-26 18:12 ` Wentao Guan
2026-05-26 19:13 ` Wentao Guan [this message]
2026-05-28 10:33 ` [PATCH v2] genksyms: Support arm64 CRC32 hardware acceleration kernel test robot
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=tencent_2FA16E0A18D6D0C0703F5D49@qq.com \
--to=guanwentao@uniontech.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=petr.pavlu@suse.com \
/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
all inboxes | Powered by JetHome®