Skip to contentSkip to conversation

mm-thp-move-ptl-taking-inside-page_check_address_pmd.patch removed from -mm tree

merged [email protected] 1 participant 1 message Nov 15, 2013

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: [merged] mm-thp-move-ptl-taking-inside-page_check_address_pmd.patch removed from -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: Fri, 15 Nov 2013 12:07:27 -0800

The patch titled
Subject: mm, thp: move ptl taking inside page_check_address_pmd()
has been removed from the -mm tree. Its filename was
mm-thp-move-ptl-taking-inside-page_check_address_pmd.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: "Kirill A. Shutemov" <[email protected]>
Subject: mm, thp: move ptl taking inside page_check_address_pmd()

With split page table lock we can't know which lock we need to take before we find the relevant pmd.

Let's move lock taking inside the function.

Cc Ingo Molnar <[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]>

---

 include/linux/huge_mm.h |    3 +-
 mm/huge_memory.c        |   43 +++++++++++++++++++++++---------------
 mm/rmap.c               |   13 ++++-------
 3 files changed, 34 insertions(+), 25 deletions(-)
include/linux/huge_mm.h renamed from include/linux/huge_mm.h~mm-thp-move-ptl-taking-inside-page_check_address_pmd +2 -1
diff -puN include/linux/huge_mm.h~mm-thp-move-ptl-taking-inside-page_check_address_pmd include/linux/huge_mm.h
@@ -54,7 +54,8 @@ enum page_check_address_pmd_flag {
 extern pmd_t *page_check_address_pmd(struct page *page,
 				     struct mm_struct *mm,
 				     unsigned long address,
-				     enum page_check_address_pmd_flag flag);
+				     enum page_check_address_pmd_flag flag,
+				     spinlock_t **ptl);
 
 #define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT)
 #define HPAGE_PMD_NR (1<<HPAGE_PMD_ORDER)
mm/huge_memory.c renamed from mm/huge_memory.c~mm-thp-move-ptl-taking-inside-page_check_address_pmd +27 -16

109 lines not on this page · raw message

mm/rmap.c renamed from mm/rmap.c~mm-thp-move-ptl-taking-inside-page_check_address_pmd +5 -8
diff -puN mm/rmap.c~mm-thp-move-ptl-taking-inside-page_check_address_pmd mm/rmap.c
@@ -665,25 +665,23 @@ int page_referenced_one(struct page *pag
 			unsigned long *vm_flags)
 {
 	struct mm_struct *mm = vma->vm_mm;
+	spinlock_t *ptl;
 	int referenced = 0;
 
 	if (unlikely(PageTransHuge(page))) {
 		pmd_t *pmd;
 
-		spin_lock(&mm->page_table_lock);
 		/*
 		 * rmap might return false positives; we must filter
 		 * these out using page_check_address_pmd().
 		 */
 		pmd = page_check_address_pmd(page, mm, address,
-					     PAGE_CHECK_ADDRESS_PMD_FLAG);
-		if (!pmd) {
-			spin_unlock(&mm->page_table_lock);
+					     PAGE_CHECK_ADDRESS_PMD_FLAG, &ptl);
+		if (!pmd)
 			goto out;
-		}
 
 		if (vma->vm_flags & VM_LOCKED) {
-			spin_unlock(&mm->page_table_lock);
+			spin_unlock(ptl);
 			*mapcount = 0;	/* break early from loop */
 			*vm_flags |= VM_LOCKED;
 			goto out;
@@ -692,10 +690,9 @@ int page_referenced_one(struct page *pag
 		/* go ahead even if the pmd is pmd_trans_splitting() */
 		if (pmdp_clear_flush_young_notify(vma, address, pmd))
 			referenced++;
-		spin_unlock(&mm->page_table_lock);
+		spin_unlock(ptl);
 	} else {
 		pte_t *pte;
-		spinlock_t *ptl;
 
 		/*
 		 * rmap might return false positives; we must filter

_

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

origin.patch x86-mm-get-aslr-work-for-hugetlb-mappings.patch mm-drop-actor-argument-of-do_generic_file_read-fix.patch