From: Gregory CLEMENT <gregory.clement@bootlin.com> To: Russell King <linux@armlinux.org.uk>, Arnd Bergmann <arnd@arndb.de> Cc: Gregory CLEMENT <gregory.clement@bootlin.com>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 0/6] ARM: Add support for large kernel page (from 8K to 64K) Date: Thu, 11 Jun 2020 15:49:08 +0200 Message-ID: <20200611134914.765827-1-gregory.clement@bootlin.com> (raw) 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(-) -- 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply index Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-11 13:49 Gregory CLEMENT [this message] 2020-06-11 13:49 ` [PATCH v2 1/6] ARM: Use PAGE_SIZE for ELF_EXEC_PAGESIZE Gregory CLEMENT 2020-06-12 8:22 ` Arnd Bergmann 2020-06-12 8:35 ` Russell King - ARM Linux admin 2020-06-12 8:46 ` Arnd Bergmann 2020-06-12 8:50 ` Russell King - ARM Linux admin 2020-06-12 11:50 ` Catalin Marinas 2020-06-12 12:06 ` Gregory CLEMENT 2020-06-12 8:52 ` Gregory CLEMENT 2020-06-11 13:49 ` [PATCH v2 2/6] ARM: pagetable: prepare hardware page table to use large page Gregory CLEMENT 2020-06-11 13:49 ` [PATCH v2 3/6] ARM: Make the number of fix bitmap depend on the page size Gregory CLEMENT 2020-06-11 13:49 ` [PATCH v2 4/6] ARM: mm: Aligned pte allocation to one page Gregory CLEMENT 2020-06-12 8:37 ` Arnd Bergmann 2020-06-12 10:25 ` Catalin Marinas 2020-06-12 11:56 ` Gregory CLEMENT 2020-06-11 13:49 ` [PATCH v2 5/6] ARM: Add large kernel page support Gregory CLEMENT 2020-06-11 13:49 ` [PATCH v2 6/6] ARM: Add 64K page support at MMU level Gregory CLEMENT 2020-06-11 16:21 ` [PATCH v2 0/6] ARM: Add support for large kernel page (from 8K to 64K) Russell King - ARM Linux admin 2020-06-12 9:15 ` Gregory CLEMENT 2020-06-12 9:23 ` Arnd Bergmann 2020-06-12 12:21 ` Catalin Marinas 2020-06-12 12:49 ` Arnd Bergmann
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200611134914.765827-1-gregory.clement@bootlin.com \ --to=gregory.clement@bootlin.com \ --cc=arnd@arndb.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux@armlinux.org.uk \ --cc=thomas.petazzoni@bootlin.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Linux-ARM-Kernel Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \ linux-arm-kernel@lists.infradead.org public-inbox-index linux-arm-kernel Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git