mm: increase lowmem size in linux-7.0
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 14 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | arch/*: increase lowmem size to avoid highmem usearch/ arch/ arch/ +11 more | +24 | 9 replies | |
| 2/4 | ARM: add CONFIG_VMSPLIT_2G_OPT optionarch/ | +7 | 0 replies | |
| 3/4 | ARM: remove support for highmem on VIVTarch/ arch/ arch/ +6 more | +16 | 5 replies | |
| 4/4 | mm: remove ARCH_NEEDS_KMAP_HIGH_GETmm/ | +10 | 0 replies |
Reviews trailers per patch
1 of 4 patches has a Reviewed-by or Acked-by.
| Patch | Dave Hansen | Christophe Leroy (CS GROUP) |
|---|---|---|
| 1/4 | A-b | R-b |
| 2/4 | ||
| 3/4 | ||
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/4] mm: increase lowmem size in linux-7.0
From: Arnd Bergmann <[email protected]>
At the kernel summit in Tokyo last week, I hosted a session on dealing with highmem in the long run, see the link below.
My feeling was that we got sufficient consensus on the plan to keep the funcationality present for the time being but instead reduce the scope of highmem in the kernel as much as we can without hurting users.
The short summary is a three stage process:
1. Nudge users towards using a larger lowmem zone with the CONFIG_VMSPLIT_* options if at all possible.
2. Drop most __GFP_HIGHMEM allocations and corresponding kmap() calls from the kernel, leaving only the subset that is likely to contain the majority of the actual allocations. Specifically we will keep anonymous and regular file backed user mappings, zsmalloc, and huge pages.
3. In a few years, also drop the page cache allocations and leave perhaps only zsmalloc using a much simpler interface. I suggested five years as the time until we do this, but the timing depends a lot on how the first two stages work out in practice, and how long the remaining highmem users plan to keep updating their kernels.
This series implements stage 1, mostly using Kconfig changes to the default settings but leaving the traditional behavior as a CONFIG_EXPERT choice in Kconfig. With the new defaults, most installations that use highmem today with 1 GiB or 2 GiB of system RAM will see all of their RAM in the lowmem zone after upgrading their kernels. My estimate is that instead of 80% to 90% of maintained embedded 32-bit systems, this should cover over 98%.
As I don't actually have hardware in the category that still needs highmem, I tested this using a qemu-system for Armv7 and PPC6xx running a Debian userland with all combinations of VMSPLIT and HIGHMEM options. I ran some kernel builds on the Arm guest to ensure that the new options don't cause functional or performance regressions for regular workloads that don't exceed the virtual address space. I also ran some tests with Firefox and was positively surprised to see that this still works on the VMSPLIT_2G_OPT configuration without highmem, though it gets close to both the address space and lowmem size limits.
The change to use VMSPLIT_3G_OPT by default on Armv5 means that I could include a patch to no longer support highmem at all on VIVT caches, as suggested by Jason Gunthorpe.
Arnd
Arnd Bergmann (4):
arch/*: increase lowmem size to avoid highmem use
ARM: add CONFIG_VMSPLIT_2G_OPT option
ARM: remove support for highmem on VIVT
mm: remove ARCH_NEEDS_KMAP_HIGH_GET
arch/arm/Kconfig | 12 ++- arch/arm/configs/aspeed_g5_defconfig | 1 - arch/arm/configs/dove_defconfig | 2 - arch/arm/configs/gemini_defconfig | 1 - arch/arm/configs/multi_v5_defconfig | 1 - arch/arm/configs/mv78xx0_defconfig | 2 - arch/arm/configs/mvebu_v5_defconfig | 1 - arch/arm/configs/u8500_defconfig | 1 - arch/arm/configs/vt8500_v6_v7_defconfig | 3 - arch/arm/include/asm/highmem.h | 56 +---------- arch/arm/mach-omap2/Kconfig | 1 - arch/arm/mm/cache-feroceon-l2.c | 31 +----- arch/arm/mm/cache-xsc3l2.c | 47 +-------- arch/arm/mm/dma-mapping.c | 12 +-- arch/arm/mm/flush.c | 19 +--- arch/microblaze/Kconfig | 9 +- arch/microblaze/configs/mmu_defconfig | 1 - arch/powerpc/Kconfig | 17 ++-- arch/powerpc/configs/44x/akebono_defconfig | 1 - arch/powerpc/configs/85xx/ksi8560_defconfig | 1 - arch/powerpc/configs/85xx/stx_gp3_defconfig | 1 - arch/x86/Kconfig | 4 +- mm/highmem.c | 100 ++------------------ 23 files changed, 56 insertions(+), 268 deletions(-)
Signature · 17 lines
2.39.5 Cc: Andrew Morton <[email protected]> Cc: Andreas Larsson <[email protected]> Cc: Christophe Leroy (CS GROUP) <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Richard Weinberger <[email protected]> Cc: Russell King <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Arnd Bergmann <[email protected]>