From: steve.capper@arm.com (Steve Capper)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 0/6] ARM: mm: HugeTLB + THP support.
Date: Thu, 18 Oct 2012 17:15:36 +0100 [thread overview]
Message-ID: <1350576942-25299-1-git-send-email-steve.capper@arm.com> (raw)
Hello,
The following patches bring both HugeTLB support and Transparent HugePage (THP)
support to ARM.
Both short descriptors (non-LPAE) and long descriptors (LPAE) are supported.
The non-LPAE HugeTLB code is based on patches by Bill Carson [1], but instead of
allocating extra memory to store "Linux PTEs", it re-purposes the domain bits
of section descriptors and constructs huge Linux PTEs on demand.
As PMDs are walked directly by the kernel THP functions (there are no
huge_pmd_offset style functions), any "linux PMD"/"hardware PMD" distinction
would require some re-working of the ARM PMD/PTE code. Use of the domain bits
allows for a more straightforward THP implementation.
Some general HugeTLB code relating to huge page migration on memory failure
(CONFIG_MEMORY_FAILURE) de-references huge pte_t *s directly rather than use
the huge_ptep_get and set_huge_pte_at functions. Thus this config option is
incompatible with non-LPAE hugepages. At the moment I can only see x86 using
CONFIG_MEMORY_FAILURE though.
For non-LPAE, I make an assumption about how the memory type is mapped between
linux PTE and section descriptor. Ideally I would like to look this information
up, possibly from get_mem_types(MT_MEMORY). Comments on an elegant way of
achieving this are welcome.
Non-LPAE code was tested on a Versatile Express (V2P-CA15_A7 Cortex A15 tile),
Tegra 2 TrimSlice and RealView ARM11MPCore.
The LPAE code manipulates the hardware page tables directly as the long
descriptors are wide enough to contain all the Linux PTE information.
The LPAE code has been tested on a Versatile Express: V2F-2XV6 Cortex A15 and
V2P-CA15_A7 Cortex A15 tiles.
This patch set requires the following to be applied on top of 3.7-rc1:
"ARM: mm: introduce L_PTE_VALID for page table entries"
(PROT_NONE series, posted by Will on linux-arm-kernel)
- http://lists.infradead.org/pipermail/linux-arm-kernel/2012-October/126130.html
"mm: thp: Set the accessed flag for old pages on access fault."
(posted by Will on linux-mm)
- http://marc.info/?l=linux-kernel&m=135048927416117&w=2
Cheers,
--
Steve
[1] - http://lists.infradead.org/pipermail/linux-arm-kernel/2012-February/084359.html
Catalin Marinas (2):
ARM: mm: HugeTLB support for LPAE systems.
ARM: mm: Transparent huge page support for LPAE systems.
Steve Capper (4):
ARM: mm: correct pte_same behaviour for LPAE.
ARM: mm: Add support for flushing HugeTLB pages.
ARM: mm: HugeTLB support for non-LPAE systems.
ARM: mm: Transparent huge page support for non-LPAE systems.
arch/arm/Kconfig | 8 ++
arch/arm/include/asm/hugetlb-2level.h | 71 ++++++++++
arch/arm/include/asm/hugetlb-3level.h | 61 +++++++++
arch/arm/include/asm/hugetlb.h | 87 ++++++++++++
arch/arm/include/asm/pgtable-2level.h | 152 ++++++++++++++++++++-
arch/arm/include/asm/pgtable-3level-hwdef.h | 2 +
arch/arm/include/asm/pgtable-3level.h | 77 +++++++++++
arch/arm/include/asm/pgtable.h | 34 ++++-
arch/arm/include/asm/tlb.h | 16 ++-
arch/arm/include/asm/tlbflush.h | 2 +
arch/arm/kernel/head.S | 10 +-
arch/arm/mm/Makefile | 6 +
arch/arm/mm/dma-mapping.c | 2 +-
arch/arm/mm/fault.c | 6 +-
arch/arm/mm/flush.c | 25 ++--
arch/arm/mm/fsr-3level.c | 2 +-
arch/arm/mm/hugetlbpage-2level.c | 115 ++++++++++++++++
arch/arm/mm/hugetlbpage-3level.c | 190 +++++++++++++++++++++++++++
arch/arm/mm/hugetlbpage.c | 65 +++++++++
19 files changed, 909 insertions(+), 22 deletions(-)
create mode 100644 arch/arm/include/asm/hugetlb-2level.h
create mode 100644 arch/arm/include/asm/hugetlb-3level.h
create mode 100644 arch/arm/include/asm/hugetlb.h
create mode 100644 arch/arm/mm/hugetlbpage-2level.c
create mode 100644 arch/arm/mm/hugetlbpage-3level.c
create mode 100644 arch/arm/mm/hugetlbpage.c
--
1.7.9.5
next reply other threads:[~2012-10-18 16:15 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-18 16:15 Steve Capper [this message]
2012-10-18 16:15 ` [RFC PATCH 1/6] ARM: mm: correct pte_same behaviour for LPAE Steve Capper
2013-01-04 5:03 ` Christoffer Dall
2013-01-08 17:56 ` Steve Capper
2012-10-18 16:15 ` [RFC PATCH 2/6] ARM: mm: Add support for flushing HugeTLB pages Steve Capper
2013-01-04 5:03 ` Christoffer Dall
2013-01-08 17:56 ` Steve Capper
2012-10-18 16:15 ` [RFC PATCH 3/6] ARM: mm: HugeTLB support for LPAE systems Steve Capper
2013-01-04 5:03 ` Christoffer Dall
2013-01-08 17:57 ` Steve Capper
2013-01-08 18:10 ` Christoffer Dall
2012-10-18 16:15 ` [RFC PATCH 4/6] ARM: mm: HugeTLB support for non-LPAE systems Steve Capper
2013-01-04 5:04 ` Christoffer Dall
2013-01-08 17:58 ` Steve Capper
2013-01-08 18:13 ` Christoffer Dall
2012-10-18 16:15 ` [RFC PATCH 5/6] ARM: mm: Transparent huge page support for LPAE systems Steve Capper
2013-01-04 5:04 ` Christoffer Dall
2013-01-08 17:59 ` Steve Capper
2013-01-08 18:15 ` Christoffer Dall
2012-10-18 16:15 ` [RFC PATCH 6/6] ARM: mm: Transparent huge page support for non-LPAE systems Steve Capper
2013-01-04 5:04 ` Christoffer Dall
2013-01-08 17:59 ` Steve Capper
2013-01-08 18:17 ` Christoffer Dall
2012-12-21 13:41 ` [RFC PATCH 0/6] ARM: mm: HugeTLB + THP support Gregory CLEMENT
2012-12-23 11:11 ` Will Deacon
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=1350576942-25299-1-git-send-email-steve.capper@arm.com \
--to=steve.capper@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).