[SRU][G/raspi][PATCH 0/2] LP: #1896761 - Provide a raspi-nolpae kernel flavor
Juerg Haefliger
juerg.haefliger at canonical.com
Thu Sep 24 08:40:58 UTC 2020
[Impact]
Running the current armhf raspi kernel on Pi 3 and 2 results in wasting ~70MB of memory because of LPAE. That's a significant amount of lost memory particularly on a Pi 3A+ which only has 512MB to begin with. Additionally, with HIGHMEM enabled, CMA memory is allocated from the highmem zone which is too small to provide the default 256MB for CMA. CMA is required for video HW acceleration and providing less than 256MB might result in applications falling back to SW rendering.
[Test Case]
On a Pi 3B:
$ dmesg | grep cma-reserved
[0.000000] Memory: 778696K/970752K available (12288K kernel code, 821K rwdata, 4088K rodata, 2048K init, 786K bss, 126520K reserved, 65536K cma-reserved, 118784K highmem)
[Regression Potential]
None that I can think of at the moment.
[Misc]
A test kernel without LPAE, without HIGHMEM and with VMSPLIT_2G on a Pi 3B:
$ dmesg | grep cma-reserved
[0.000000] Memory: 848400K/970752K available (12288K kernel code, 811K rwdata, 4056K rodata, 1024K init, 761K bss, 56816K reserved, 65536K cma-reserved)
Which results in ~70MB more available memory compared to the current raspi kernel.
Juerg Haefliger (2):
UBUNTU: [Packaging] raspi: Add new flavor raspi-nolpae for armhf
UBUNTU: [Config] raspi: Disable LPAE and HIGHMEM and set VMSPLIT_2G=y
debian.raspi/config/arm64/config.common.arm64 | 2 +-
debian.raspi/config/armhf/config.common.armhf | 4 +---
debian.raspi/config/armhf/config.flavour.raspi | 7 +++++++
debian.raspi/config/armhf/config.flavour.raspi-nolpae | 10 ++++++++++
debian.raspi/config/config.common.ubuntu | 9 ++++-----
debian.raspi/control.d/vars.raspi-nolpae | 6 ++++++
debian.raspi/rules.d/armhf.mk | 2 +-
7 files changed, 30 insertions(+), 10 deletions(-)
create mode 100644 debian.raspi/config/armhf/config.flavour.raspi-nolpae
create mode 100644 debian.raspi/control.d/vars.raspi-nolpae
--
2.25.1
More information about the kernel-team
mailing list