mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "liuyuntao (F)" <liuyuntao12@huawei.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <arnd@arndb.de>,
	<ardb@kernel.org>, <linux@armlinux.org.uk>, <afd@ti.com>,
	<akpm@linux-foundation.org>, <kirill.shutemov@linux.intel.com>,
	<corbet@lwn.net>, <rppt@kernel.org>, <robh@kernel.org>,
	<tglx@linutronix.de>, <linus.walleij@linaro.org>,
	<maskray@google.com>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Chris Brandt <Chris.Brandt@renesas.com>
Subject: Re: [PATCH-next v4] arm32: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION
Date: Wed, 12 Jun 2024 09:54:53 +0800	[thread overview]
Message-ID: <ce637b13-de98-4a77-9df6-8bc6ec177009@huawei.com> (raw)
In-Reply-To: <CAMuHMdWMAg59p+hzeLG9Uc3X55Vt9ccNy5BRoPX0RJbxrMOFLA@mail.gmail.com>

That's great, thanks for your testing.

On 2024/6/11 20:45, Geert Uytterhoeven wrote:
> Hi Yuntao,
> 
> On Sat, Mar 16, 2024 at 3:44 AM Yuntao Liu <liuyuntao12@huawei.com> wrote:
>> The current arm32 architecture does not yet support the
>> HAVE_LD_DEAD_CODE_DATA_ELIMINATION feature. arm32 is widely used in
>> embedded scenarios, and enabling this feature would be beneficial for
>> reducing the size of the kernel image.
>>
>> In order to make this work, we keep the necessary tables by annotating
>> them with KEEP, also it requires further changes to linker script to KEEP
>> some tables and wildcard compiler generated sections into the right place.
>> When using ld.lld for linking, KEEP is not recognized within the OVERLAY
>> command, and Ard proposed a concise method to solve this problem.
>>
>> It boots normally with defconfig, vexpress_defconfig and tinyconfig.
>>
>> The size comparison of zImage is as follows:
>> defconfig       vexpress_defconfig      tinyconfig
>> 5137712         5138024                 424192          no dce
>> 5032560         4997824                 298384          dce
>> 2.0%            2.7%                    29.7%           shrink
>>
>> When using smaller config file, there is a significant reduction in the
>> size of the zImage.
>>
>> We also tested this patch on a commercially available single-board
>> computer, and the comparison is as follows:
>> a15eb_config
>> 2161384         no dce
>> 2092240         dce
>> 3.2%            shrink
>>
>> The zImage size has been reduced by approximately 3.2%, which is 70KB on
>> 2.1M.
>>
>> Signed-off-by: Yuntao Liu <liuyuntao12@huawei.com>
>> Tested-by: Arnd Bergmann <arnd@arndb.de>
>> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
> 
> Thanks for your patch, which is now commit ed0f941022515ff4 ("ARM:
> 9404/1: arm32: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION") in
> arm/for-next (next-20240611).
> 
> I gave this a try on my custom configs for RSK+RZA1 (RZ/A1H)
> and RZA2MEVB (RZ/A2M).  According to bloat-o-meter, enabling
> HAVE_LD_DEAD_CODE_DATA_ELIMINATION reduced kernel size by almost
> 500 KiB (-8.3%).  The figures reported in "Memory: ... available"
> were even more impressive: 1032 KiB more free memory than before.
> 
> As these boards have only 32 resp. 64 MiB of RAM, and some products
> even use RZ/A1H with just the 10 MiB of on-chip SRAM, this is a good
> improvement to have!
> Thanks!
> 
> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
> 
> Gr{oetje,eeting}s,
> 
>                          Geert
> 

      reply	other threads:[~2024-06-12  1:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-16  2:39 Yuntao Liu
2024-03-19 17:12 ` Ard Biesheuvel
2024-06-03 12:55   ` liuyuntao (F)
2024-06-03 13:47     ` Linus Walleij
2024-06-03 14:15       ` liuyuntao (F)
2024-06-11 12:45 ` Geert Uytterhoeven
2024-06-12  1:54   ` liuyuntao (F) [this message]

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=ce637b13-de98-4a77-9df6-8bc6ec177009@huawei.com \
    --to=liuyuntao12@huawei.com \
    --cc=Chris.Brandt@renesas.com \
    --cc=afd@ti.com \
    --cc=akpm@linux-foundation.org \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=corbet@lwn.net \
    --cc=geert@linux-m68k.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maskray@google.com \
    --cc=robh@kernel.org \
    --cc=rppt@kernel.org \
    --cc=tglx@linutronix.de \
    /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®