[SRU][F/raspi][PATCH 0/1] Large Page support disabled on Raspberry Pi kernels (LP: #1933532)

Juerg Haefliger juerg.haefliger at canonical.com
Fri Jan 21 13:41:27 UTC 2022


Enable hugepages and hugetlb for Focal raspi 5.4 to match the main arm kernels
and later raspi kernels. This is reasonable given that there are Pi 4 devices
with up to 8GB of memory.

[ Impact ]

It appears that large page support and transparent hugepages are disabled in config on the Raspberry Pi. It would be nice if they were enabled in the kernel configuration, even if they are disabled by default. Then they could be set in user-editable config via the "transparent_hugepage" boot option.

With 4GB hardware in this family, there might be valid uses for large pages.

root at ubuntu:/home/ubuntu# hugeadm --explain
hugeadm:ERROR: kernel does not support huge pages

root at ubuntu:/home/ubuntu# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal

root at ubuntu:/home/ubuntu# uname -a
Linux ubuntu 5.4.0-1038-raspi #41-Ubuntu SMP PREEMPT Thu Jun 17 14:14:11 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

root at ubuntu:/home/ubuntu# grep -i huge /boot/config-5.4.0-1038-raspi
CONFIG_SYS_SUPPORTS_HUGETLBFS=y
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
CONFIG_HAVE_ARCH_HUGE_VMAP=y
# CONFIG_TRANSPARENT_HUGEPAGE is not set
# CONFIG_HUGETLBFS is not set

[ Test Case ]

See above:

[ Fix ]

Enable HUGETLBFS and TRANSPARENT_HUGEPAGE to match the master kernel and hirsure and later raspi kernels.

[ Where Problems Could Occur ]

Thess configs enable code that is disabled by default. However, there is minimal stub code running at boot so problems would most likely show up as splats during boot or later on when hugetlbfs is explicitly mounted by systemd.

Juerg Haefliger (1):
  UBUNTU: [Config] raspi: Set HUGETLBFS=y and TRANSPARENT_HUGEPAGE=y

 debian.raspi/config/annotations          |  8 ++++----
 debian.raspi/config/config.common.ubuntu | 13 +++++++++++--
 2 files changed, 15 insertions(+), 6 deletions(-)

-- 
2.30.2




More information about the kernel-team mailing list