From: David Daney <ddaney@caviumnetworks.com>
To: Ralf Baechle <ralf@linux-mips.org>,
linux-mips <linux-mips@linux-mips.org>
Cc: wli@holomorphy.com
Subject: [PATCH 0/5] MIPS: Add hugeTLBfs support.
Date: Wed, 27 May 2009 17:46:15 -0700 [thread overview]
Message-ID: <4A1DDED7.3020306@caviumnetworks.com> (raw)
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
next reply other threads:[~2009-05-28 0:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 0:46 David Daney [this message]
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
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=4A1DDED7.3020306@caviumnetworks.com \
--to=ddaney@caviumnetworks.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=wli@holomorphy.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 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.