All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] MIPS: Add hugeTLBfs support.
@ 2009-05-28  0:46 David Daney
  2009-05-28  0:47 ` [PATCH 1/5] MIPS: Add support files for hugeTLBfs David Daney
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: David Daney @ 2009-05-28  0:46 UTC (permalink / raw)
  To: Ralf Baechle, linux-mips; +Cc: wli

This patch set adds hugetlbfs support to the MIPS architecture.

Huge pages are implemented by placing the PTE for the huge page
(flagged by the _PAGE_HUGE) in the PMD.  This gives a huge page size
of 2M (PTRS_PER_PTE * PAGE_SIZE) when the PAGE_SIZE is 4K.  Each huge
page occupies a complete TLB entry with the first half of the page
covered by entrylo0 and the second half by entrylo1.  Since there is
only a single PTE for the huge page in the PMD, the value of entrylo1
is derived from entrylo0 by adding a constant of half a huge page.  We
do this for several reasons:

1) The valid values of PageMask are such that this combination is
allowed.

2) Since the PageMask applies to both entrylo0 *and* entrylo1 we
cannot leave one of them empty because the current vma allocation
mechanisms don't handle excluding areas that would fall in any gaps
caused by an empty entrylo from allocation to normal sized pages.

When hugetlbfs is enabled, there is an approximately two instruction
overhead in the normal path of the TLB refill handler.  This is needed
to check the _PAGE_HUGE bit of each PMD entry.  With hugetlbfs
disabled, there is no change.

Currently the patch only works for 64-bit kernels because the value of
PTRS_PER_PTE in 32-bit kernels is such that it is impossible to have a
valid PageMask.  It is thought that by adjusting the page allocation
scheme, 32-bit kernels could be supported in the future.

All of the patches except the forth touch only the arch/mips tree.
The forth patch is the generic Kconfig change to allow MIPS to turn on
hugetlbfs.

I will reply with the five patches.

David Daney (5):
   MIPS: Add support files for hugeTLBfs.
   MIPS: Add hugeTLBfs page defines.
   MIPS: TLB support for hugeTLBfs.
   Enable hugetlbfs for more systems.
   MIPS: Add SYS_SUPPORTS_HUGETLBFS Kconfig variable and enable it for
     some systems.

  arch/mips/Kconfig                    |   11 +++
  arch/mips/include/asm/hugetlb.h      |  114 +++++++++++++++++++++++
  arch/mips/include/asm/mipsregs.h     |   16 ++++
  arch/mips/include/asm/page.h         |    5 +
  arch/mips/include/asm/pgtable-bits.h |    1 +
  arch/mips/include/asm/pgtable.h      |   10 ++
  arch/mips/mm/Makefile                |    1 +
  arch/mips/mm/hugetlbpage.c           |  101 +++++++++++++++++++++
  arch/mips/mm/tlb-r4k.c               |   43 +++++++---
  arch/mips/mm/tlbex.c                 |  165 
+++++++++++++++++++++++++++++++++-
  fs/Kconfig                           |    2 +-
  11 files changed, 456 insertions(+), 13 deletions(-)
  create mode 100644 arch/mips/include/asm/hugetlb.h
  create mode 100644 arch/mips/mm/hugetlbpage.c

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-06-16 10:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-28  0:46 [PATCH 0/5] MIPS: Add hugeTLBfs support David Daney
2009-05-28  0:47 ` [PATCH 1/5] MIPS: Add support files for hugeTLBfs David Daney
2009-05-28  0:47 ` [PATCH 2/5] MIPS: Add hugeTLBfs page defines David Daney
2009-05-28  0:47 ` [PATCH 3/5] MIPS: TLB support for hugeTLBfs David Daney
2009-05-28  0:47 ` [PATCH 4/5] Enable hugetlbfs for more systems David Daney
2009-06-16 10:20   ` Ralf Baechle
2009-05-28  0:47 ` [PATCH 5/5] MIPS: Add SYS_SUPPORTS_HUGETLBFS Kconfig variable and enable it for some systems David Daney
2009-06-16 10:23   ` Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.