On 11/26/2011 06:35 AM, Hillf Danton wrote:
This patchset adds THP support for MIPS.
Two page-table-entry bits, namely huge and splitting, are required by THP.
The huge bit is already defined and used for huge TLB, THP simply uses it.
For the splitting bit, the present bit is selected, since for regular pmd
entry pmd_present() is defined to be not directly related to the bit. If this
selection is not sane, this work as a whole is a mess. So selected then the
current work of huge TLB could also be used for THP, see next patch.
Other pmd mangling primitives are added in a straight manner, and they are
confined to a single file, asm/thp.h.
Signed-off-by: Hillf Danton<email@example.com>
--- a/arch/mips/include/asm/pgtable-bits.h Thu Nov 24 21:16:22 2011
+++ b/arch/mips/include/asm/pgtable-bits.h Sat Nov 26 20:49:31 2011
@@ -94,7 +94,7 @@
/* set:pagecache unset:swap */
#define _PAGE_FILE (_PAGE_MODIFIED)
+#if defined(CONFIG_HUGETLB_PAGE) || defined(CONFIG_TRANSPARENT_HUGEPAGE)
/* huge tlb page */
#define _PAGE_HUGE_SHIFT (_PAGE_MODIFIED_SHIFT + 1)
#define _PAGE_HUGE (1<< _PAGE_HUGE_SHIFT)
--- a/arch/mips/include/asm/pgtable.h Thu Nov 24 21:17:38 2011
+++ b/arch/mips/include/asm/pgtable.h Sat Nov 26 20:50:52 2011
@@ -394,6 +394,9 @@ static inline int io_remap_pfn_range(str
remap_pfn_range(vma, vaddr, pfn, size, prot)
--- /dev/null Sat Nov 26 21:04:52 2011
+++ b/arch/mips/include/asm/thp.h Sat Nov 26 21:02:52 2011
@@ -0,0 +1,167 @@
+ * pmd primitives for transparent huge page
+ * Copyright (C) 2011 David Daney
I'm not sure where that copyright came from.
Other than that, these seem plausible.