Skip to content

ARM: Add support for large kernel page (from 8K to 64K)

Gregory CLEMENT linux-arm-kernel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest6 patches 15 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6ARM: Use PAGE_SIZE for ELF_EXEC_PAGESIZEarch/arm/include/asm/elf.h+1 -17 replies
2/6ARM: pagetable: prepare hardware page table to use large pagearch/arm/include/asm/pgtable-2level.h+3 -30 replies
3/6ARM: Make the number of fix bitmap depend on the page sizearch/arm/include/asm/fixmap.h+2 -10 replies
4/6ARM: mm: Aligned pte allocation to one pagearch/arm/mm/mmu.c+3 -13 replies
5/6ARM: Add large kernel page supportarch/arm/include/asm/page.h arch/arm/include/asm/pgtable.h arch/arm/include/asm/shmparam.h +9 more+205 -70 replies
6/6ARM: Add 64K page support at MMU levelarch/arm/include/asm/page.h arch/arm/include/asm/pgtable-2level-hwdef.h arch/arm/include/asm/tlbflush.h +3 more+70 -130 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/6] ARM: Add support for large kernel page (from 8K to 64K)

Hello,

On ARM based NAS it is possible to have storage volume larger than 16TB, especially with the use of LVM. However, on 32-bit architectures, the page cache index is stored on 32 bits, which means that given a page size of 4 KB, we can only address volumes of up to 16 TB.

Therefore, one option to use such large volumes and filesystems on 32 bits architecture is to increase the page size.

This series allows to support 8K, 16K, 32K and 64K kernel pages. On ARM the size of the page can be either 4K or 64K, so for the other size a "software emulation" is used, here Linux thinks it is using pages of 8 KB, 16 KB or 32 KB, while underneath the MMU still uses 4 KB pages.

For ARM there is already a difference between the kernel page and the hardware page in the way they are managed. In the same 4K space the Linux kernel deals with 2 PTE tables at the beginning, while the hardware deals with 2 other hardware PTE tables.

This series takes advantage of it and pushes further the difference between hardware and Linux version by using larger page size at Linux kernel level.

This series is inspired from fa0ca2726ea9 ("DSMP 64K support") and 4ef803e12baf ("mmu: large-page: Added support for multiple kernel page sizes") from
https://github.com/MarvellEmbeddedProcessors/linux-marvell.git. This feature was used since many years and intensively on real product.

The first 4 patches are preparation to make distinction between kernel page size and hardware page size. For 4K kernel page they won't modify anything.

The fifth patch is the one actually adding the support for the large page kernel. This feature was restricted for ARM v7 and non LPAE architecture. It could maybe be extended to support them, but until now it has only been tested on ARMv7.

The last patch allows to use the hardware 64K large page.

Gregory

Gregory CLEMENT (6):
ARM: Use PAGE_SIZE for ELF_EXEC_PAGESIZE
ARM: pagetable: prepare hardware page table to use large page
ARM: Make the number of fix bitmap depend on the page size
ARM: mm: Aligned pte allocation to one page
ARM: Add large kernel page support
ARM: Add 64K page support at MMU level

 arch/arm/include/asm/elf.h                  |  2 +-
 arch/arm/include/asm/fixmap.h               |  3 +-
 arch/arm/include/asm/page.h                 | 12 ++++
 arch/arm/include/asm/pgtable-2level-hwdef.h |  8 +++
 arch/arm/include/asm/pgtable-2level.h       |  6 +-
 arch/arm/include/asm/pgtable.h              |  4 ++
 arch/arm/include/asm/shmparam.h             |  4 ++
 arch/arm/include/asm/tlbflush.h             | 21 +++++-
 arch/arm/kernel/entry-common.S              | 13 ++++
 arch/arm/kernel/traps.c                     | 10 +++
 arch/arm/mm/Kconfig                         | 72 +++++++++++++++++++++
 arch/arm/mm/fault.c                         | 19 ++++++
 arch/arm/mm/mmu.c                           | 22 ++++++-
 arch/arm/mm/pgd.c                           |  2 +
 arch/arm/mm/proc-v7-2level.S                | 72 ++++++++++++++++++++-
 arch/arm/mm/tlb-v7.S                        | 14 +++-
 16 files changed, 271 insertions(+), 13 deletions(-)
Signature · 7 lines
2.26.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel