linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve Capper <steve.capper@arm.com>
To: linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: c.dall@virtualopensystems.com, akpm@linux-foundation.org,
	mhocko@suse.cz, kirill@shutemov.name, aarcange@redhat.com,
	cmetcalf@tilera.com, hoffman@marvell.com, notasas@gmail.com,
	bill4carson@gmail.com, will.deacon@arm.com,
	catalin.marinas@arm.com, maen@marvell.com, shadi@marvell.com,
	tawfik@marvell.com, Steve Capper <steve.capper@arm.com>
Subject: [PATCH 0/6] ARM: mm: HugeTLB + THP support.
Date: Fri,  8 Feb 2013 15:01:17 +0000	[thread overview]
Message-ID: <1360335683-7755-1-git-send-email-steve.capper@arm.com> (raw)

Hello,
The following patches bring both HugeTLB support and Transparent
HugePage (THP) support to ARM.

These are not intended for 3.9.

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.

Non-LPAE code was tested on an Arndale board (Exynos 5250) and a
Tegra 2 TrimSlice.

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 an Arndale board (Exynos 5250).

This patch set is based on 3.8-rc6.

Major changes since the RFC:
 * huge pmd sharing removed from the 3-level code as this was
   found to be very rarely, if ever?, used. This allowed for some
   code simplification.

 * hardware pmd bits for 2-levels of paging are now taken from
   mmu.c. Also the mapping code now uses pte/pmd bit helper
   functions rather than the custom pre-processor logic.

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       |  121 +++++++++++++++++++++
 arch/arm/include/asm/hugetlb-3level.h       |   61 +++++++++++
 arch/arm/include/asm/hugetlb.h              |   87 +++++++++++++++
 arch/arm/include/asm/pgtable-2level.h       |  151 +++++++++++++++++++++++++++
 arch/arm/include/asm/pgtable-3level-hwdef.h |    2 +
 arch/arm/include/asm/pgtable-3level.h       |   83 +++++++++++++++
 arch/arm/include/asm/pgtable.h              |   13 ++-
 arch/arm/include/asm/tlb.h                  |   16 ++-
 arch/arm/include/asm/tlbflush.h             |    2 +
 arch/arm/kernel/head.S                      |   10 +-
 arch/arm/mm/Makefile                        |    1 +
 arch/arm/mm/dma-mapping.c                   |    2 +-
 arch/arm/mm/fault.c                         |   11 --
 arch/arm/mm/flush.c                         |   26 +++--
 arch/arm/mm/fsr-2level.c                    |    4 +-
 arch/arm/mm/fsr-3level.c                    |    4 +-
 arch/arm/mm/hugetlbpage.c                   |  100 ++++++++++++++++++
 arch/arm/mm/mmu.c                           |   27 +++++
 19 files changed, 697 insertions(+), 32 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.c

-- 
1.7.9.5

             reply	other threads:[~2013-02-08 15:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-08 15:01 Steve Capper [this message]
2013-02-08 15:01 ` [PATCH 1/6] ARM: mm: correct pte_same behaviour for LPAE Steve Capper
2013-02-08 15:01 ` [PATCH 2/6] ARM: mm: Add support for flushing HugeTLB pages Steve Capper
2013-02-08 15:01 ` [PATCH 3/6] ARM: mm: HugeTLB support for LPAE systems Steve Capper
2013-02-08 15:01 ` [PATCH 4/6] ARM: mm: HugeTLB support for non-LPAE systems Steve Capper
2013-02-08 15:01 ` [PATCH 5/6] ARM: mm: Transparent huge page support for LPAE systems Steve Capper
2013-02-08 15:01 ` [PATCH 6/6] ARM: mm: Transparent huge page support for non-LPAE systems Steve Capper
2013-02-10 20:45 ` [PATCH 0/6] ARM: mm: HugeTLB + THP support Grazvydas Ignotas

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=1360335683-7755-1-git-send-email-steve.capper@arm.com \
    --to=steve.capper@arm.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bill4carson@gmail.com \
    --cc=c.dall@virtualopensystems.com \
    --cc=catalin.marinas@arm.com \
    --cc=cmetcalf@tilera.com \
    --cc=hoffman@marvell.com \
    --cc=kirill@shutemov.name \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maen@marvell.com \
    --cc=mhocko@suse.cz \
    --cc=notasas@gmail.com \
    --cc=shadi@marvell.com \
    --cc=tawfik@marvell.com \
    --cc=will.deacon@arm.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
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).