Skip to contentSkip to conversation

+ x86-mm-enable-split-page-table-lock-for-pmd-level.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Oct 7, 2013 x86

lore
Share & tools
lore
#0 lore raw

Subject: + x86-mm-enable-split-page-table-lock-for-pmd-level.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Mon, 07 Oct 2013 16:12:48 -0700

The patch titled
Subject: x86, mm: enable split page table lock for PMD level
has been added to the -mm tree. Its filename is
x86-mm-enable-split-page-table-lock-for-pmd-level.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/x86-mm-enable-split-page-table-lock-for-pmd-level.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/x86-mm-enable-split-page-table-lock-for-pmd-level.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: "Kirill A. Shutemov" <[email protected]>
Subject: x86, mm: enable split page table lock for PMD level

Enable PMD split page table lock for X86_64 and PAE.

Cc Ingo Molnar <[email protected]>
Cc Naoya Horiguchi <[email protected]>
Cc "Eric W . Biederman" <[email protected]>
Cc "Paul E . McKenney" <[email protected]>
Cc Al Viro <[email protected]>
Cc Andi Kleen <[email protected]>
Cc Andrea Arcangeli <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Dave Jones <[email protected]>
Cc David Howells <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Kees Cook <[email protected]>
Cc Mel Gorman <[email protected]>
Cc Michael Kerrisk <[email protected]>
Cc Oleg Nesterov <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Rik van Riel <[email protected]>
Cc Robin Holt <[email protected]>
Cc Sedat Dilek <[email protected]>
Cc Srikar Dronamraju <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Hugh Dickins <[email protected]>

---

 arch/x86/Kconfig               |    4 ++++
 arch/x86/include/asm/pgalloc.h |   11 ++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)
arch/x86/Kconfig renamed from arch/x86/Kconfig~x86-mm-enable-split-page-table-lock-for-pmd-level +4 -0
diff -puN arch/x86/Kconfig~x86-mm-enable-split-page-table-lock-for-pmd-level arch/x86/Kconfig
@@ -1880,6 +1880,10 @@ config USE_PERCPU_NUMA_NODE_ID
 	def_bool y
 	depends on NUMA
 
+config ARCH_ENABLE_SPLIT_PMD_PTLOCK
+	def_bool y
+	depends on X86_64 || X86_PAE
+
 menu "Power management and ACPI options"
 
 config ARCH_HIBERNATION_HEADER
arch/x86/include/asm/pgalloc.h renamed from arch/x86/include/asm/pgalloc.h~x86-mm-enable-split-page-table-lock-for-pmd-level +10 -1
diff -puN arch/x86/include/asm/pgalloc.h~x86-mm-enable-split-page-table-lock-for-pmd-level arch/x86/include/asm/pgalloc.h
@@ -80,12 +80,21 @@ static inline void pmd_populate(struct m
 #if PAGETABLE_LEVELS > 2
 static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
 {
-	return (pmd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
+	struct page *page;
+	page = alloc_pages(GFP_KERNEL | __GFP_REPEAT| __GFP_ZERO, 0);
+	if (!page)
+		return NULL;
+	if (!pgtable_pmd_page_ctor(page)) {
+		__free_pages(page, 0);
+		return NULL;
+	}
+	return (pmd_t *)page_address(page);
 }
 
 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
 {
 	BUG_ON((unsigned long)pmd & (PAGE_SIZE-1));
+	pgtable_pmd_page_dtor(virt_to_page(pmd));
 	free_page((unsigned long)pmd);
 }
 

_

Patches currently in -mm which might be from [email protected] are

mm-huge_memoryc-fix-stale-comments-of-transparent_hugepage_flags.patch mm-thp-cleanup-mv-alloc_hugepage-to-better-place.patch mm-thp-khugepaged-add-policy-for-finding-target-node.patch mm-thp-khugepaged-add-policy-for-finding-target-node-fix.patch mm-avoid-increase-sizeofstruct-page-due-to-split-page-table-lock.patch mm-rename-use_split_ptlocks-to-use_split_pte_ptlocks.patch mm-convert-mm-nr_ptes-to-atomic_long_t.patch mm-introduce-api-for-split-page-table-lock-for-pmd-level.patch mm-thp-change-pmd_trans_huge_lock-to-return-taken-lock.patch mm-thp-move-ptl-taking-inside-page_check_address_pmd.patch mm-thp-do-not-access-mm-pmd_huge_pte-directly.patch mm-hugetlb-convert-hugetlbfs-to-use-split-pmd-lock.patch mm-hugetlb-convert-hugetlbfs-to-use-split-pmd-lock-checkpatch-fixes.patch mm-convert-the-rest-to-new-page-table-lock-api.patch mm-implement-split-page-table-lock-for-pmd-level.patch x86-mm-enable-split-page-table-lock-for-pmd-level.patch thp-mm-locking-tail-page-is-a-bug.patch mm-drop-actor-argument-of-do_generic_file_read.patch mm-drop-actor-argument-of-do_generic_file_read-fix.patch