From: Nathan Chancellor <nathan@kernel.org>
To: Charlie Jenkins <charlie@rivosinc.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Nicolas Schier <nicolas@fjasle.eu>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org
Subject: Re: [PATCH] kbuild: Use --strip-unneeded with INSTALL_MOD_STRIP
Date: Thu, 30 Jan 2025 20:52:45 -0700 [thread overview]
Message-ID: <20250131035245.GA47826@ax162> (raw)
In-Reply-To: <20250122-strip_unneeded-v1-1-ac29a726cb41@rivosinc.com>
On Wed, Jan 22, 2025 at 07:17:26PM -0800, Charlie Jenkins wrote:
> On riscv, kernel modules end up with a significant number of local
> symbols. This becomes apparent when compiling modules with debug symbols
> enabled. Using amdgpu.ko as an example of a large module, on riscv the
> size is 754MB (no stripping), 53MB (--strip-debug), and 21MB
> (--strip-unneeded). ON x86, amdgpu.ko is 482MB (no stripping), 21MB
> (--strip-debug), and 20MB (--strip-unneeded).
>
> Use --strip-unneeded instead of --strip-debug to strip modules so
> decrease the size of the resulting modules. This is particularly
> relevant for riscv, but also marginally aids other architectures.
>
> Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Is there any sort of regression risk with this patch? If so, another
option may be to give another level to INSTALL_MOD_STRIP like 2 so that
INSTALL_MOD_STRIP=1 continues to behave as before but people can easily
opt into this option. No strong opinion because I am not sure but was
not sure if it was considered.
Regardless:
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
> ---
> scripts/Makefile.modinst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
> index f97c9926ed31b2b14601ff7773a2ea48b225628b..c22f35f6b9db3cac3923b9e787b219f752570642 100644
> --- a/scripts/Makefile.modinst
> +++ b/scripts/Makefile.modinst
> @@ -80,7 +80,7 @@ quiet_cmd_install = INSTALL $@
> ifdef INSTALL_MOD_STRIP
>
> ifeq ($(INSTALL_MOD_STRIP),1)
> -strip-option := --strip-debug
> +strip-option := --strip-unneeded
> else
> strip-option := $(INSTALL_MOD_STRIP)
> endif
>
> ---
> base-commit: ffd294d346d185b70e28b1a28abe367bbfe53c04
> change-id: 20250122-strip_unneeded-cab729310056
> --
> - Charlie
>
WARNING: multiple messages have this Message-ID (diff)
From: Nathan Chancellor <nathan@kernel.org>
To: Charlie Jenkins <charlie@rivosinc.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Nicolas Schier <nicolas@fjasle.eu>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org
Subject: Re: [PATCH] kbuild: Use --strip-unneeded with INSTALL_MOD_STRIP
Date: Thu, 30 Jan 2025 20:52:45 -0700 [thread overview]
Message-ID: <20250131035245.GA47826@ax162> (raw)
In-Reply-To: <20250122-strip_unneeded-v1-1-ac29a726cb41@rivosinc.com>
On Wed, Jan 22, 2025 at 07:17:26PM -0800, Charlie Jenkins wrote:
> On riscv, kernel modules end up with a significant number of local
> symbols. This becomes apparent when compiling modules with debug symbols
> enabled. Using amdgpu.ko as an example of a large module, on riscv the
> size is 754MB (no stripping), 53MB (--strip-debug), and 21MB
> (--strip-unneeded). ON x86, amdgpu.ko is 482MB (no stripping), 21MB
> (--strip-debug), and 20MB (--strip-unneeded).
>
> Use --strip-unneeded instead of --strip-debug to strip modules so
> decrease the size of the resulting modules. This is particularly
> relevant for riscv, but also marginally aids other architectures.
>
> Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Is there any sort of regression risk with this patch? If so, another
option may be to give another level to INSTALL_MOD_STRIP like 2 so that
INSTALL_MOD_STRIP=1 continues to behave as before but people can easily
opt into this option. No strong opinion because I am not sure but was
not sure if it was considered.
Regardless:
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
> ---
> scripts/Makefile.modinst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
> index f97c9926ed31b2b14601ff7773a2ea48b225628b..c22f35f6b9db3cac3923b9e787b219f752570642 100644
> --- a/scripts/Makefile.modinst
> +++ b/scripts/Makefile.modinst
> @@ -80,7 +80,7 @@ quiet_cmd_install = INSTALL $@
> ifdef INSTALL_MOD_STRIP
>
> ifeq ($(INSTALL_MOD_STRIP),1)
> -strip-option := --strip-debug
> +strip-option := --strip-unneeded
> else
> strip-option := $(INSTALL_MOD_STRIP)
> endif
>
> ---
> base-commit: ffd294d346d185b70e28b1a28abe367bbfe53c04
> change-id: 20250122-strip_unneeded-cab729310056
> --
> - Charlie
>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-01-31 3:52 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-23 3:17 [PATCH] kbuild: Use --strip-unneeded with INSTALL_MOD_STRIP Charlie Jenkins
2025-01-23 3:17 ` Charlie Jenkins
2025-01-31 3:52 ` Nathan Chancellor [this message]
2025-01-31 3:52 ` Nathan Chancellor
2025-01-31 6:54 ` Charlie Jenkins
2025-01-31 6:54 ` Charlie Jenkins
2025-01-31 15:10 ` Masahiro Yamada
2025-01-31 15:10 ` Masahiro Yamada
2025-01-31 21:33 ` Charlie Jenkins
2025-01-31 21:33 ` Charlie Jenkins
2025-02-04 4:04 ` Masahiro Yamada
2025-02-04 4:04 ` Masahiro Yamada
2025-02-04 18:29 ` Charlie Jenkins
2025-02-04 18:29 ` Charlie Jenkins
2025-02-05 15:00 ` Masahiro Yamada
2025-02-05 15:00 ` Masahiro Yamada
2025-04-03 15:07 ` Alexandre Ghiti
2025-04-03 15:07 ` Alexandre Ghiti
2025-04-21 6:06 ` Alexandre Ghiti
2025-04-21 6:06 ` Alexandre Ghiti
2025-01-31 14:26 ` Masahiro Yamada
2025-01-31 14:26 ` Masahiro Yamada
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=20250131035245.GA47826@ax162 \
--to=nathan@kernel.org \
--cc=aou@eecs.berkeley.edu \
--cc=charlie@rivosinc.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=masahiroy@kernel.org \
--cc=nicolas@fjasle.eu \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.