* [PATCH] riscv: defconfig: k210: Disable CONFIG_VT
@ 2020-11-24 18:57 Geert Uytterhoeven
2020-11-25 6:14 ` Damien Le Moal
0 siblings, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2020-11-24 18:57 UTC (permalink / raw)
To: Damien Le Moal
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv,
linux-kernel, Geert Uytterhoeven
There is no need to enable Virtual Terminal support in the Canaan
Kendryte K210 defconfigs, as no terminal devices are supported and
enabled. Hence disable CONFIG_VT, and remove the no longer needed
override for CONFIG_VGA_CONSOLE.
This reduces kernel size by ca. 65 KiB.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
Against k210-sysctl-v15
---
arch/riscv/configs/nommu_k210_defconfig | 2 +-
arch/riscv/configs/nommu_k210_sdcard_defconfig | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/configs/nommu_k210_defconfig b/arch/riscv/configs/nommu_k210_defconfig
index df89d53bd125679b..9262223037e43479 100644
--- a/arch/riscv/configs/nommu_k210_defconfig
+++ b/arch/riscv/configs/nommu_k210_defconfig
@@ -48,6 +48,7 @@ CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_SERIO is not set
+# CONFIG_VT is not set
# CONFIG_LEGACY_PTYS is not set
# CONFIG_LDISC_AUTOLOAD is not set
# CONFIG_HW_RANDOM is not set
@@ -67,7 +68,6 @@ CONFIG_GPIO_SIFIVE=y
CONFIG_POWER_RESET=y
CONFIG_POWER_RESET_SYSCON=y
# CONFIG_HWMON is not set
-# CONFIG_VGA_CONSOLE is not set
# CONFIG_HID is not set
# CONFIG_USB_SUPPORT is not set
CONFIG_NEW_LEDS=y
diff --git a/arch/riscv/configs/nommu_k210_sdcard_defconfig b/arch/riscv/configs/nommu_k210_sdcard_defconfig
index 3d2cb4747e7f85b7..4cd1715dd0cf3747 100644
--- a/arch/riscv/configs/nommu_k210_sdcard_defconfig
+++ b/arch/riscv/configs/nommu_k210_sdcard_defconfig
@@ -41,6 +41,7 @@ CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_SERIO is not set
+# CONFIG_VT is not set
# CONFIG_LEGACY_PTYS is not set
# CONFIG_LDISC_AUTOLOAD is not set
# CONFIG_HW_RANDOM is not set
@@ -60,7 +61,6 @@ CONFIG_GPIO_SIFIVE=y
CONFIG_POWER_RESET=y
CONFIG_POWER_RESET_SYSCON=y
# CONFIG_HWMON is not set
-# CONFIG_VGA_CONSOLE is not set
# CONFIG_HID is not set
# CONFIG_USB_SUPPORT is not set
CONFIG_MMC=y
--
2.25.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: defconfig: k210: Disable CONFIG_VT
2020-11-24 18:57 [PATCH] riscv: defconfig: k210: Disable CONFIG_VT Geert Uytterhoeven
@ 2020-11-25 6:14 ` Damien Le Moal
2020-11-25 8:20 ` Geert Uytterhoeven
2020-11-25 8:51 ` Geert Uytterhoeven
0 siblings, 2 replies; 11+ messages in thread
From: Damien Le Moal @ 2020-11-25 6:14 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv, linux-kernel
On 2020/11/25 3:57, Geert Uytterhoeven wrote:
> There is no need to enable Virtual Terminal support in the Canaan
> Kendryte K210 defconfigs, as no terminal devices are supported and
> enabled. Hence disable CONFIG_VT, and remove the no longer needed
> override for CONFIG_VGA_CONSOLE.
>
> This reduces kernel size by ca. 65 KiB.
Indeed, nice saving. Just tested, and all is good.
Can I squash this patch into the 2 defconfig update patches of the series,
adding your signed-off-by ? Or would you prefer that I keep it as a separate patch ?
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> Against k210-sysctl-v15
> ---
> arch/riscv/configs/nommu_k210_defconfig | 2 +-
> arch/riscv/configs/nommu_k210_sdcard_defconfig | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/riscv/configs/nommu_k210_defconfig b/arch/riscv/configs/nommu_k210_defconfig
> index df89d53bd125679b..9262223037e43479 100644
> --- a/arch/riscv/configs/nommu_k210_defconfig
> +++ b/arch/riscv/configs/nommu_k210_defconfig
> @@ -48,6 +48,7 @@ CONFIG_DEVTMPFS_MOUNT=y
> # CONFIG_INPUT_KEYBOARD is not set
> # CONFIG_INPUT_MOUSE is not set
> # CONFIG_SERIO is not set
> +# CONFIG_VT is not set
> # CONFIG_LEGACY_PTYS is not set
> # CONFIG_LDISC_AUTOLOAD is not set
> # CONFIG_HW_RANDOM is not set
> @@ -67,7 +68,6 @@ CONFIG_GPIO_SIFIVE=y
> CONFIG_POWER_RESET=y
> CONFIG_POWER_RESET_SYSCON=y
> # CONFIG_HWMON is not set
> -# CONFIG_VGA_CONSOLE is not set
> # CONFIG_HID is not set
> # CONFIG_USB_SUPPORT is not set
> CONFIG_NEW_LEDS=y
> diff --git a/arch/riscv/configs/nommu_k210_sdcard_defconfig b/arch/riscv/configs/nommu_k210_sdcard_defconfig
> index 3d2cb4747e7f85b7..4cd1715dd0cf3747 100644
> --- a/arch/riscv/configs/nommu_k210_sdcard_defconfig
> +++ b/arch/riscv/configs/nommu_k210_sdcard_defconfig
> @@ -41,6 +41,7 @@ CONFIG_DEVTMPFS_MOUNT=y
> # CONFIG_INPUT_KEYBOARD is not set
> # CONFIG_INPUT_MOUSE is not set
> # CONFIG_SERIO is not set
> +# CONFIG_VT is not set
> # CONFIG_LEGACY_PTYS is not set
> # CONFIG_LDISC_AUTOLOAD is not set
> # CONFIG_HW_RANDOM is not set
> @@ -60,7 +61,6 @@ CONFIG_GPIO_SIFIVE=y
> CONFIG_POWER_RESET=y
> CONFIG_POWER_RESET_SYSCON=y
> # CONFIG_HWMON is not set
> -# CONFIG_VGA_CONSOLE is not set
> # CONFIG_HID is not set
> # CONFIG_USB_SUPPORT is not set
> CONFIG_MMC=y
>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: defconfig: k210: Disable CONFIG_VT
2020-11-25 6:14 ` Damien Le Moal
@ 2020-11-25 8:20 ` Geert Uytterhoeven
2020-11-25 8:23 ` Damien Le Moal
2020-11-25 8:51 ` Geert Uytterhoeven
1 sibling, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2020-11-25 8:20 UTC (permalink / raw)
To: Damien Le Moal
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv, linux-kernel
Hi Damien,
On Wed, Nov 25, 2020 at 7:14 AM Damien Le Moal <Damien.LeMoal@wdc.com> wrote:
> On 2020/11/25 3:57, Geert Uytterhoeven wrote:
> > There is no need to enable Virtual Terminal support in the Canaan
> > Kendryte K210 defconfigs, as no terminal devices are supported and
> > enabled. Hence disable CONFIG_VT, and remove the no longer needed
> > override for CONFIG_VGA_CONSOLE.
> >
> > This reduces kernel size by ca. 65 KiB.
>
> Indeed, nice saving. Just tested, and all is good.
>
> Can I squash this patch into the 2 defconfig update patches of the series,
> adding your signed-off-by ? Or would you prefer that I keep it as a separate patch ?
Feel free to squash it into your queued updates.
No need to add my SoB, as the full updates don't pass through me.
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: defconfig: k210: Disable CONFIG_VT
2020-11-25 8:20 ` Geert Uytterhoeven
@ 2020-11-25 8:23 ` Damien Le Moal
0 siblings, 0 replies; 11+ messages in thread
From: Damien Le Moal @ 2020-11-25 8:23 UTC (permalink / raw)
To: geert; +Cc: paul.walmsley, palmer, linux-riscv, linux-kernel, aou
On Wed, 2020-11-25 at 09:20 +0100, Geert Uytterhoeven wrote:
> Hi Damien,
>
> On Wed, Nov 25, 2020 at 7:14 AM Damien Le Moal <Damien.LeMoal@wdc.com> wrote:
> > On 2020/11/25 3:57, Geert Uytterhoeven wrote:
> > > There is no need to enable Virtual Terminal support in the Canaan
> > > Kendryte K210 defconfigs, as no terminal devices are supported and
> > > enabled. Hence disable CONFIG_VT, and remove the no longer needed
> > > override for CONFIG_VGA_CONSOLE.
> > >
> > > This reduces kernel size by ca. 65 KiB.
> >
> > Indeed, nice saving. Just tested, and all is good.
> >
> > Can I squash this patch into the 2 defconfig update patches of the series,
> > adding your signed-off-by ? Or would you prefer that I keep it as a separate patch ?
>
> Feel free to squash it into your queued updates.
> No need to add my SoB, as the full updates don't pass through me.
Done. Thanks !
>
> Thanks!
>
> Gr{oetje,eeting}s,
>
> Geert
>
--
Damien Le Moal
Western Digital
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: defconfig: k210: Disable CONFIG_VT
2020-11-25 6:14 ` Damien Le Moal
2020-11-25 8:20 ` Geert Uytterhoeven
@ 2020-11-25 8:51 ` Geert Uytterhoeven
2020-11-25 9:02 ` Damien Le Moal
1 sibling, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2020-11-25 8:51 UTC (permalink / raw)
To: Damien Le Moal
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv, linux-kernel
Hi Damien,
On Wed, Nov 25, 2020 at 7:14 AM Damien Le Moal <Damien.LeMoal@wdc.com> wrote:
> On 2020/11/25 3:57, Geert Uytterhoeven wrote:
> > There is no need to enable Virtual Terminal support in the Canaan
> > Kendryte K210 defconfigs, as no terminal devices are supported and
> > enabled. Hence disable CONFIG_VT, and remove the no longer needed
> > override for CONFIG_VGA_CONSOLE.
> >
> > This reduces kernel size by ca. 65 KiB.
>
> Indeed, nice saving. Just tested, and all is good.
I used my old script[1] to check the impact of disabling config options.
I don't see any other low-hanging fruits:
Disabling CONFIG_BLOCK saves 492890 bytes
Disabling CONFIG_EXT4_FS saves 322528 bytes
Disabling CONFIG_PRINTK saves 214612 bytes
Disabling CONFIG_SMP saves 214486 bytes
Disabling CONFIG_FRAME_POINTER saves 166368 bytes
Disabling CONFIG_TTY saves 156618 bytes
Disabling CONFIG_PROC_FS saves 110274 bytes
Disabling CONFIG_MMC saves 87656 bytes
Disabling CONFIG_VT saves 70350 bytes
Disabling CONFIG_SYSFS saves 62298 bytes
Disabling CONFIG_BUG saves 50882 bytes
Disabling CONFIG_SPI saves 34420 bytes
Disabling CONFIG_SOC_CANAAN saves 34286 bytes
Disabling CONFIG_I2C saves 34086 bytes
Disabling CONFIG_PROC_SYSCTL saves 23890 bytes
Disabling CONFIG_POSIX_TIMERS saves 18388 bytes
Disabling CONFIG_I2C_DESIGNWARE_PLATFORM saves 17530 bytes
Disabling CONFIG_MMC_BLOCK saves 17200 bytes
Disabling CONFIG_UNIX98_PTYS saves 16360 bytes
Disabling CONFIG_MULTIUSER saves 16148 bytes
Disabling CONFIG_NEW_LEDS saves 15964 bytes
Disabling CONFIG_SPI_DESIGNWARE saves 15434 bytes
Disabling CONFIG_GPIO_CDEV saves 15352 bytes
Disabling CONFIG_MMC_SPI saves 14754 bytes
Disabling CONFIG_SOC_CANAAN_K210_DTB_BUILTIN saves 13864 bytes
(Yes, I have ext4 enabled ;-)
I haven't done enough riscv kernel development yet to assess if I need
CONFIG_FRAME_POINTER or not.
[1] https://github.com/geertu/linux-scripts/blob/master/linux-analyze-marginal-sizes
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: defconfig: k210: Disable CONFIG_VT
2020-11-25 8:51 ` Geert Uytterhoeven
@ 2020-11-25 9:02 ` Damien Le Moal
2020-11-25 9:26 ` Geert Uytterhoeven
0 siblings, 1 reply; 11+ messages in thread
From: Damien Le Moal @ 2020-11-25 9:02 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv, linux-kernel
On 2020/11/25 17:51, Geert Uytterhoeven wrote:
> Hi Damien,
>
> On Wed, Nov 25, 2020 at 7:14 AM Damien Le Moal <Damien.LeMoal@wdc.com> wrote:
>> On 2020/11/25 3:57, Geert Uytterhoeven wrote:
>>> There is no need to enable Virtual Terminal support in the Canaan
>>> Kendryte K210 defconfigs, as no terminal devices are supported and
>>> enabled. Hence disable CONFIG_VT, and remove the no longer needed
>>> override for CONFIG_VGA_CONSOLE.
>>>
>>> This reduces kernel size by ca. 65 KiB.
>>
>> Indeed, nice saving. Just tested, and all is good.
>
> I used my old script[1] to check the impact of disabling config options.
>
> I don't see any other low-hanging fruits:
>
> Disabling CONFIG_BLOCK saves 492890 bytes
> Disabling CONFIG_EXT4_FS saves 322528 bytes
> Disabling CONFIG_PRINTK saves 214612 bytes
> Disabling CONFIG_SMP saves 214486 bytes
> Disabling CONFIG_FRAME_POINTER saves 166368 bytes
> Disabling CONFIG_TTY saves 156618 bytes
> Disabling CONFIG_PROC_FS saves 110274 bytes
> Disabling CONFIG_MMC saves 87656 bytes
> Disabling CONFIG_VT saves 70350 bytes
> Disabling CONFIG_SYSFS saves 62298 bytes
> Disabling CONFIG_BUG saves 50882 bytes
> Disabling CONFIG_SPI saves 34420 bytes
> Disabling CONFIG_SOC_CANAAN saves 34286 bytes
> Disabling CONFIG_I2C saves 34086 bytes
> Disabling CONFIG_PROC_SYSCTL saves 23890 bytes
> Disabling CONFIG_POSIX_TIMERS saves 18388 bytes
> Disabling CONFIG_I2C_DESIGNWARE_PLATFORM saves 17530 bytes
> Disabling CONFIG_MMC_BLOCK saves 17200 bytes
> Disabling CONFIG_UNIX98_PTYS saves 16360 bytes
> Disabling CONFIG_MULTIUSER saves 16148 bytes
> Disabling CONFIG_NEW_LEDS saves 15964 bytes
> Disabling CONFIG_SPI_DESIGNWARE saves 15434 bytes
> Disabling CONFIG_GPIO_CDEV saves 15352 bytes
> Disabling CONFIG_MMC_SPI saves 14754 bytes
> Disabling CONFIG_SOC_CANAAN_K210_DTB_BUILTIN saves 13864 bytes
>
> (Yes, I have ext4 enabled ;-)
>
> I haven't done enough riscv kernel development yet to assess if I need
> CONFIG_FRAME_POINTER or not.
Disabling it significantly reduced code size for me. Since the series is more
stable now, it is not really needed, so I disabled it in the defconfig.
I was just fiddling with CONFIG_UNIX98_PTYS. Disabling it is OK with the simple
busybox userspace (no telnet/xterm like app running). But it saves only about
1KB with my toolchain (gcc 9.3). So I left that one enabled. I am surprised that
you see 16K size impact... How big is your image ?
For me, it is 1.768 MB right now for the sdcard defconfig, with CONFIG_VT
disabled and ext2 enabled.
Disabling the block layer, ext2 and mmc driver, the size goes down to 1.511 MB
without any intramfs cpio file embedded.
>
> [1] https://github.com/geertu/linux-scripts/blob/master/linux-analyze-marginal-sizes
Thanks ! I will try to run this on my end.
>
> Gr{oetje,eeting}s,
>
> Geert
>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: defconfig: k210: Disable CONFIG_VT
2020-11-25 9:02 ` Damien Le Moal
@ 2020-11-25 9:26 ` Geert Uytterhoeven
2020-11-25 11:00 ` Damien Le Moal
0 siblings, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2020-11-25 9:26 UTC (permalink / raw)
To: Damien Le Moal
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv, linux-kernel
Hi Damien,
On Wed, Nov 25, 2020 at 10:02 AM Damien Le Moal <Damien.LeMoal@wdc.com> wrote:
> On 2020/11/25 17:51, Geert Uytterhoeven wrote:
> > On Wed, Nov 25, 2020 at 7:14 AM Damien Le Moal <Damien.LeMoal@wdc.com> wrote:
> >> On 2020/11/25 3:57, Geert Uytterhoeven wrote:
> >>> There is no need to enable Virtual Terminal support in the Canaan
> >>> Kendryte K210 defconfigs, as no terminal devices are supported and
> >>> enabled. Hence disable CONFIG_VT, and remove the no longer needed
> >>> override for CONFIG_VGA_CONSOLE.
> >>>
> >>> This reduces kernel size by ca. 65 KiB.
> >>
> >> Indeed, nice saving. Just tested, and all is good.
> >
> > I used my old script[1] to check the impact of disabling config options.
> > I haven't done enough riscv kernel development yet to assess if I need
> > CONFIG_FRAME_POINTER or not.
>
> Disabling it significantly reduced code size for me. Since the series is more
> stable now, it is not really needed, so I disabled it in the defconfig.
>
> I was just fiddling with CONFIG_UNIX98_PTYS. Disabling it is OK with the simple
> busybox userspace (no telnet/xterm like app running). But it saves only about
> 1KB with my toolchain (gcc 9.3). So I left that one enabled. I am surprised that
> you see 16K size impact... How big is your image ?
>
> For me, it is 1.768 MB right now for the sdcard defconfig, with CONFIG_VT
> disabled and ext2 enabled.
It might depend on how you measure. "size" says 15 KiB impact for UNIX98
ptys, while bloat-o-meter reported less than 7 (my script uses "size").
I'm at 1.88 MiB, with ext4 and without frame pointers.
I also got rid of the EFI partition support, and a few I/O schedulers:
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_MQ_IOSCHED_DEADLINE is not set
+# CONFIG_MQ_IOSCHED_KYBER is not set
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: defconfig: k210: Disable CONFIG_VT
2020-11-25 9:26 ` Geert Uytterhoeven
@ 2020-11-25 11:00 ` Damien Le Moal
2020-11-25 11:04 ` Damien Le Moal
2020-11-25 12:47 ` Geert Uytterhoeven
0 siblings, 2 replies; 11+ messages in thread
From: Damien Le Moal @ 2020-11-25 11:00 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv, linux-kernel
On 2020/11/25 18:26, Geert Uytterhoeven wrote:
> Hi Damien,
>
> On Wed, Nov 25, 2020 at 10:02 AM Damien Le Moal <Damien.LeMoal@wdc.com> wrote:
>> On 2020/11/25 17:51, Geert Uytterhoeven wrote:
>>> On Wed, Nov 25, 2020 at 7:14 AM Damien Le Moal <Damien.LeMoal@wdc.com> wrote:
>>>> On 2020/11/25 3:57, Geert Uytterhoeven wrote:
>>>>> There is no need to enable Virtual Terminal support in the Canaan
>>>>> Kendryte K210 defconfigs, as no terminal devices are supported and
>>>>> enabled. Hence disable CONFIG_VT, and remove the no longer needed
>>>>> override for CONFIG_VGA_CONSOLE.
>>>>>
>>>>> This reduces kernel size by ca. 65 KiB.
>>>>
>>>> Indeed, nice saving. Just tested, and all is good.
>>>
>>> I used my old script[1] to check the impact of disabling config options.
>
>>> I haven't done enough riscv kernel development yet to assess if I need
>>> CONFIG_FRAME_POINTER or not.
>>
>> Disabling it significantly reduced code size for me. Since the series is more
>> stable now, it is not really needed, so I disabled it in the defconfig.
>>
>> I was just fiddling with CONFIG_UNIX98_PTYS. Disabling it is OK with the simple
>> busybox userspace (no telnet/xterm like app running). But it saves only about
>> 1KB with my toolchain (gcc 9.3). So I left that one enabled. I am surprised that
>> you see 16K size impact... How big is your image ?
>>
>> For me, it is 1.768 MB right now for the sdcard defconfig, with CONFIG_VT
>> disabled and ext2 enabled.
>
> It might depend on how you measure. "size" says 15 KiB impact for UNIX98
> ptys, while bloat-o-meter reported less than 7 (my script uses "size").
I look at the size of the arch/riscv/boot/loader.bin file since that is what
gets loaded in RAM and booted. It is significantly smaller than vmlinux file
size. E.g. for the sd card defconfig, I have:
vmlinux: 2369920 B
loader.bin: 1751250 B
> I'm at 1.88 MiB, with ext4 and without frame pointers.
> I also got rid of the EFI partition support, and a few I/O schedulers:
>
> +CONFIG_PARTITION_ADVANCED=y
> +# CONFIG_EFI_PARTITION is not set
> +# CONFIG_MQ_IOSCHED_DEADLINE is not set
> +# CONFIG_MQ_IOSCHED_KYBER is not set
I have all of these disabled. The schedulers are forced disabled in the sdcard
defconfig.
I also noticed that it hugely depend on the compiler. Using the buildroot
generated rv64 gcc 10, the kernel image goes up to almost 2 MB. So for the
kernel, I keep using the bootlin precompiled gcc 9.3:
https://toolchains.bootlin.com/
Just noticed that they now have a 10.2 version available. Will try it out.
>
> Gr{oetje,eeting}s,
>
> Geert
>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: defconfig: k210: Disable CONFIG_VT
2020-11-25 11:00 ` Damien Le Moal
@ 2020-11-25 11:04 ` Damien Le Moal
2020-11-25 12:47 ` Geert Uytterhoeven
1 sibling, 0 replies; 11+ messages in thread
From: Damien Le Moal @ 2020-11-25 11:04 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv, linux-kernel
On 2020/11/25 20:00, Damien Le Moal wrote:
> On 2020/11/25 18:26, Geert Uytterhoeven wrote:
>> Hi Damien,
>>
>> On Wed, Nov 25, 2020 at 10:02 AM Damien Le Moal <Damien.LeMoal@wdc.com> wrote:
>>> On 2020/11/25 17:51, Geert Uytterhoeven wrote:
>>>> On Wed, Nov 25, 2020 at 7:14 AM Damien Le Moal <Damien.LeMoal@wdc.com> wrote:
>>>>> On 2020/11/25 3:57, Geert Uytterhoeven wrote:
>>>>>> There is no need to enable Virtual Terminal support in the Canaan
>>>>>> Kendryte K210 defconfigs, as no terminal devices are supported and
>>>>>> enabled. Hence disable CONFIG_VT, and remove the no longer needed
>>>>>> override for CONFIG_VGA_CONSOLE.
>>>>>>
>>>>>> This reduces kernel size by ca. 65 KiB.
>>>>>
>>>>> Indeed, nice saving. Just tested, and all is good.
>>>>
>>>> I used my old script[1] to check the impact of disabling config options.
>>
>>>> I haven't done enough riscv kernel development yet to assess if I need
>>>> CONFIG_FRAME_POINTER or not.
>>>
>>> Disabling it significantly reduced code size for me. Since the series is more
>>> stable now, it is not really needed, so I disabled it in the defconfig.
>>>
>>> I was just fiddling with CONFIG_UNIX98_PTYS. Disabling it is OK with the simple
>>> busybox userspace (no telnet/xterm like app running). But it saves only about
>>> 1KB with my toolchain (gcc 9.3). So I left that one enabled. I am surprised that
>>> you see 16K size impact... How big is your image ?
>>>
>>> For me, it is 1.768 MB right now for the sdcard defconfig, with CONFIG_VT
>>> disabled and ext2 enabled.
>>
>> It might depend on how you measure. "size" says 15 KiB impact for UNIX98
>> ptys, while bloat-o-meter reported less than 7 (my script uses "size").
>
> I look at the size of the arch/riscv/boot/loader.bin file since that is what
> gets loaded in RAM and booted. It is significantly smaller than vmlinux file
> size. E.g. for the sd card defconfig, I have:
>
> vmlinux: 2369920 B
> loader.bin: 1751250 B
>
>> I'm at 1.88 MiB, with ext4 and without frame pointers.
>> I also got rid of the EFI partition support, and a few I/O schedulers:
>>
>> +CONFIG_PARTITION_ADVANCED=y
>> +# CONFIG_EFI_PARTITION is not set
>> +# CONFIG_MQ_IOSCHED_DEADLINE is not set
>> +# CONFIG_MQ_IOSCHED_KYBER is not set
>
> I have all of these disabled. The schedulers are forced disabled in the sdcard
> defconfig.
>
> I also noticed that it hugely depend on the compiler. Using the buildroot
> generated rv64 gcc 10, the kernel image goes up to almost 2 MB. So for the
> kernel, I keep using the bootlin precompiled gcc 9.3:
>
> https://toolchains.bootlin.com/
>
> Just noticed that they now have a 10.2 version available. Will try it out.
Correction: my PATH was actually pointing to the Fedora riscv64 gcc from the
distro rpm package which is version 10.2, not 9.3.
>
>>
>> Gr{oetje,eeting}s,
>>
>> Geert
>>
>
>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: defconfig: k210: Disable CONFIG_VT
2020-11-25 11:00 ` Damien Le Moal
2020-11-25 11:04 ` Damien Le Moal
@ 2020-11-25 12:47 ` Geert Uytterhoeven
2020-11-26 1:59 ` Damien Le Moal
1 sibling, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2020-11-25 12:47 UTC (permalink / raw)
To: Damien Le Moal
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv, linux-kernel
Hi Damien,
On Wed, Nov 25, 2020 at 12:00 PM Damien Le Moal <Damien.LeMoal@wdc.com> wrote:
> On 2020/11/25 18:26, Geert Uytterhoeven wrote:
> > On Wed, Nov 25, 2020 at 10:02 AM Damien Le Moal <Damien.LeMoal@wdc.com> wrote:
> >> On 2020/11/25 17:51, Geert Uytterhoeven wrote:
> >> I was just fiddling with CONFIG_UNIX98_PTYS. Disabling it is OK with the simple
> >> busybox userspace (no telnet/xterm like app running). But it saves only about
> >> 1KB with my toolchain (gcc 9.3). So I left that one enabled. I am surprised that
> >> you see 16K size impact... How big is your image ?
> >>
> >> For me, it is 1.768 MB right now for the sdcard defconfig, with CONFIG_VT
> >> disabled and ext2 enabled.
> >
> > It might depend on how you measure. "size" says 15 KiB impact for UNIX98
> > ptys, while bloat-o-meter reported less than 7 (my script uses "size").
>
> I look at the size of the arch/riscv/boot/loader.bin file since that is what
> gets loaded in RAM and booted. It is significantly smaller than vmlinux file
> size. E.g. for the sd card defconfig, I have:
>
> vmlinux: 2369920 B
> loader.bin: 1751250 B
Doesn't loader.bin lack bss?
Bss does consume RAM, so you do want to take that into account, too.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] riscv: defconfig: k210: Disable CONFIG_VT
2020-11-25 12:47 ` Geert Uytterhoeven
@ 2020-11-26 1:59 ` Damien Le Moal
0 siblings, 0 replies; 11+ messages in thread
From: Damien Le Moal @ 2020-11-26 1:59 UTC (permalink / raw)
To: geert; +Cc: paul.walmsley, palmer, linux-riscv, linux-kernel, aou
On Wed, 2020-11-25 at 13:47 +0100, Geert Uytterhoeven wrote:
> Hi Damien,
>
> On Wed, Nov 25, 2020 at 12:00 PM Damien Le Moal <Damien.LeMoal@wdc.com> wrote:
> > On 2020/11/25 18:26, Geert Uytterhoeven wrote:
> > > On Wed, Nov 25, 2020 at 10:02 AM Damien Le Moal <Damien.LeMoal@wdc.com> wrote:
> > > > On 2020/11/25 17:51, Geert Uytterhoeven wrote:
> > > > I was just fiddling with CONFIG_UNIX98_PTYS. Disabling it is OK with the simple
> > > > busybox userspace (no telnet/xterm like app running). But it saves only about
> > > > 1KB with my toolchain (gcc 9.3). So I left that one enabled. I am surprised that
> > > > you see 16K size impact... How big is your image ?
> > > >
> > > > For me, it is 1.768 MB right now for the sdcard defconfig, with CONFIG_VT
> > > > disabled and ext2 enabled.
> > >
> > > It might depend on how you measure. "size" says 15 KiB impact for UNIX98
> > > ptys, while bloat-o-meter reported less than 7 (my script uses "size").
> >
> > I look at the size of the arch/riscv/boot/loader.bin file since that is what
> > gets loaded in RAM and booted. It is significantly smaller than vmlinux file
> > size. E.g. for the sd card defconfig, I have:
> >
> > vmlinux: 2369920 B
> > loader.bin: 1751250 B
>
> Doesn't loader.bin lack bss?
> Bss does consume RAM, so you do want to take that into account, too.
Indeed. Good point. Thanks !
>
> Gr{oetje,eeting}s,
>
> Geert
>
--
Damien Le Moal
Western Digital
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2020-11-26 2:00 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24 18:57 [PATCH] riscv: defconfig: k210: Disable CONFIG_VT Geert Uytterhoeven
2020-11-25 6:14 ` Damien Le Moal
2020-11-25 8:20 ` Geert Uytterhoeven
2020-11-25 8:23 ` Damien Le Moal
2020-11-25 8:51 ` Geert Uytterhoeven
2020-11-25 9:02 ` Damien Le Moal
2020-11-25 9:26 ` Geert Uytterhoeven
2020-11-25 11:00 ` Damien Le Moal
2020-11-25 11:04 ` Damien Le Moal
2020-11-25 12:47 ` Geert Uytterhoeven
2020-11-26 1:59 ` Damien Le Moal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).