diff mbox series

[v2] machine/qemuarm*: don't explicitly set vmalloc

Message ID 20230418164100.4035328-1-ross.burton@arm.com
State Accepted, archived
Commit 816dd95320ba2e4a0f6b816e4f58999c0f235ae2
Headers show
Series [v2] machine/qemuarm*: don't explicitly set vmalloc | expand

Commit Message

Ross Burton April 18, 2023, 4:41 p.m. UTC
In 5c6064 the qemuarm* machines gained vmalloc=256, because in testing
Bruce was seeing problems when the vmalloc area was too big for the
memory size of the machine (eg 256MB).

The intention was for the area to be very small, but 256 bytes is too
small and the kernel sets a minimal vmalloc area of 16MiB:

[    0.000000] vmalloc area is too small, limiting to 16MiB

However, a 16MiB area is too small and results in pages of messages when
you try and use the system:

[  242.822481] vmap allocation for size 4100096 failed: use vmalloc=<size> to increase size

There have been a number of changes since this commit, remove the
explicit vmalloc argument and use the default.  I've tested that the
system still boots locally.

[1] early_vmalloc(), https://elixir.bootlin.com/linux/latest/source/arch/arm/mm/mmu.c#L1170
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/conf/machine/qemuarm.conf   | 2 --
 meta/conf/machine/qemuarmv5.conf | 1 -
 2 files changed, 3 deletions(-)

Comments

Khem Raj April 18, 2023, 4:54 p.m. UTC | #1
On Tue, Apr 18, 2023 at 9:41 AM Ross Burton <ross.burton@arm.com> wrote:
>
> In 5c6064 the qemuarm* machines gained vmalloc=256, because in testing
> Bruce was seeing problems when the vmalloc area was too big for the
> memory size of the machine (eg 256MB).
>

default seems to be 128M for 32bit systems with memory < 1G and 256M
for memory < 2G
but I think using defaults might be preferred it works with original problem too

> The intention was for the area to be very small, but 256 bytes is too
> small and the kernel sets a minimal vmalloc area of 16MiB:
>
> [    0.000000] vmalloc area is too small, limiting to 16MiB
>
> However, a 16MiB area is too small and results in pages of messages when
> you try and use the system:
>
> [  242.822481] vmap allocation for size 4100096 failed: use vmalloc=<size> to increase size
>
> There have been a number of changes since this commit, remove the
> explicit vmalloc argument and use the default.  I've tested that the
> system still boots locally.
>
> [1] early_vmalloc(), https://elixir.bootlin.com/linux/latest/source/arch/arm/mm/mmu.c#L1170
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
>  meta/conf/machine/qemuarm.conf   | 2 --
>  meta/conf/machine/qemuarmv5.conf | 1 -
>  2 files changed, 3 deletions(-)
>
> diff --git a/meta/conf/machine/qemuarm.conf b/meta/conf/machine/qemuarm.conf
> index c5234231e2e..aa9ce882035 100644
> --- a/meta/conf/machine/qemuarm.conf
> +++ b/meta/conf/machine/qemuarm.conf
> @@ -17,8 +17,6 @@ QB_SYSTEM_NAME = "qemu-system-arm"
>  QB_MACHINE = "-machine virt,highmem=off"
>  QB_CPU = "-cpu cortex-a15"
>  QB_SMP ?= "-smp 4"
> -# Standard Serial console
> -QB_KERNEL_CMDLINE_APPEND = "vmalloc=256"
>  # For graphics to work we need to define the VGA device as well as the necessary USB devices
>  QB_GRAPHICS = "-device virtio-gpu-pci"
>  QB_OPT_APPEND = "-device qemu-xhci -device usb-tablet -device usb-kbd"
> diff --git a/meta/conf/machine/qemuarmv5.conf b/meta/conf/machine/qemuarmv5.conf
> index 6e59e42c3ab..ef1b4ece230 100644
> --- a/meta/conf/machine/qemuarmv5.conf
> +++ b/meta/conf/machine/qemuarmv5.conf
> @@ -12,7 +12,6 @@ SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;ttyAMA1"
>  # For runqemu
>  QB_SYSTEM_NAME = "qemu-system-arm"
>  QB_MACHINE = "-machine versatilepb"
> -QB_KERNEL_CMDLINE_APPEND = "vmalloc=256"
>  QB_GRAPHICS = "-device virtio-gpu-pci"
>  QB_OPT_APPEND = "-device qemu-xhci -device usb-tablet -device usb-kbd"
>  QB_DTB = "${@oe.utils.version_less_or_equal('PREFERRED_VERSION_linux-yocto', '4.7', '', 'zImage-versatile-pb.dtb', d)}"
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#180198): https://lists.openembedded.org/g/openembedded-core/message/180198
> Mute This Topic: https://lists.openembedded.org/mt/98348317/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Randy MacLeod May 2, 2023, 5:29 p.m. UTC | #2
On 2023-04-18 12:54, Khem Raj via lists.openembedded.org wrote:
> On Tue, Apr 18, 2023 at 9:41 AM Ross Burton<ross.burton@arm.com>  wrote:
>> In 5c6064 the qemuarm* machines gained vmalloc=256, because in testing
>> Bruce was seeing problems when the vmalloc area was too big for the
>> memory size of the machine (eg 256MB).
>>
> default seems to be 128M for 32bit systems with memory < 1G and 256M
> for memory < 2G
> but I think using defaults might be preferred it works with original problem too


I think we should backport this to mickledore, right Ross?

Steve, is so does it apply cleanly or should Narpat send a PR?

../Randy


>
>> The intention was for the area to be very small, but 256 bytes is too
>> small and the kernel sets a minimal vmalloc area of 16MiB:
>>
>> [    0.000000] vmalloc area is too small, limiting to 16MiB
>>
>> However, a 16MiB area is too small and results in pages of messages when
>> you try and use the system:
>>
>> [  242.822481] vmap allocation for size 4100096 failed: use vmalloc=<size> to increase size
>>
>> There have been a number of changes since this commit, remove the
>> explicit vmalloc argument and use the default.  I've tested that the
>> system still boots locally.
>>
>> [1] early_vmalloc(),https://elixir.bootlin.com/linux/latest/source/arch/arm/mm/mmu.c#L1170
>> Signed-off-by: Ross Burton<ross.burton@arm.com>
>> ---
>>   meta/conf/machine/qemuarm.conf   | 2 --
>>   meta/conf/machine/qemuarmv5.conf | 1 -
>>   2 files changed, 3 deletions(-)
>>
>> diff --git a/meta/conf/machine/qemuarm.conf b/meta/conf/machine/qemuarm.conf
>> index c5234231e2e..aa9ce882035 100644
>> --- a/meta/conf/machine/qemuarm.conf
>> +++ b/meta/conf/machine/qemuarm.conf
>> @@ -17,8 +17,6 @@ QB_SYSTEM_NAME = "qemu-system-arm"
>>   QB_MACHINE = "-machine virt,highmem=off"
>>   QB_CPU = "-cpu cortex-a15"
>>   QB_SMP ?= "-smp 4"
>> -# Standard Serial console
>> -QB_KERNEL_CMDLINE_APPEND = "vmalloc=256"
>>   # For graphics to work we need to define the VGA device as well as the necessary USB devices
>>   QB_GRAPHICS = "-device virtio-gpu-pci"
>>   QB_OPT_APPEND = "-device qemu-xhci -device usb-tablet -device usb-kbd"
>> diff --git a/meta/conf/machine/qemuarmv5.conf b/meta/conf/machine/qemuarmv5.conf
>> index 6e59e42c3ab..ef1b4ece230 100644
>> --- a/meta/conf/machine/qemuarmv5.conf
>> +++ b/meta/conf/machine/qemuarmv5.conf
>> @@ -12,7 +12,6 @@ SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;ttyAMA1"
>>   # For runqemu
>>   QB_SYSTEM_NAME = "qemu-system-arm"
>>   QB_MACHINE = "-machine versatilepb"
>> -QB_KERNEL_CMDLINE_APPEND = "vmalloc=256"
>>   QB_GRAPHICS = "-device virtio-gpu-pci"
>>   QB_OPT_APPEND = "-device qemu-xhci -device usb-tablet -device usb-kbd"
>>   QB_DTB ="${@oe.utils.version_less_or_equal('PREFERRED_VERSION_linux-yocto', 
>> '4.7', '', 'zImage-versatile-pb.dtb', d)}"
>> --
>> 2.34.1
>>
>>
>>
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#180199):https://lists.openembedded.org/g/openembedded-core/message/180199
>> Mute This Topic:https://lists.openembedded.org/mt/98348317/3616765
>> Group Owner:openembedded-core+owner@lists.openembedded.org
>> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub  [randy.macleod@windriver.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
diff mbox series

Patch

diff --git a/meta/conf/machine/qemuarm.conf b/meta/conf/machine/qemuarm.conf
index c5234231e2e..aa9ce882035 100644
--- a/meta/conf/machine/qemuarm.conf
+++ b/meta/conf/machine/qemuarm.conf
@@ -17,8 +17,6 @@  QB_SYSTEM_NAME = "qemu-system-arm"
 QB_MACHINE = "-machine virt,highmem=off"
 QB_CPU = "-cpu cortex-a15"
 QB_SMP ?= "-smp 4"
-# Standard Serial console
-QB_KERNEL_CMDLINE_APPEND = "vmalloc=256"
 # For graphics to work we need to define the VGA device as well as the necessary USB devices
 QB_GRAPHICS = "-device virtio-gpu-pci"
 QB_OPT_APPEND = "-device qemu-xhci -device usb-tablet -device usb-kbd"
diff --git a/meta/conf/machine/qemuarmv5.conf b/meta/conf/machine/qemuarmv5.conf
index 6e59e42c3ab..ef1b4ece230 100644
--- a/meta/conf/machine/qemuarmv5.conf
+++ b/meta/conf/machine/qemuarmv5.conf
@@ -12,7 +12,6 @@  SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;ttyAMA1"
 # For runqemu
 QB_SYSTEM_NAME = "qemu-system-arm"
 QB_MACHINE = "-machine versatilepb"
-QB_KERNEL_CMDLINE_APPEND = "vmalloc=256"
 QB_GRAPHICS = "-device virtio-gpu-pci"
 QB_OPT_APPEND = "-device qemu-xhci -device usb-tablet -device usb-kbd"
 QB_DTB = "${@oe.utils.version_less_or_equal('PREFERRED_VERSION_linux-yocto', '4.7', '', 'zImage-versatile-pb.dtb', d)}"