Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1499070

[RFC PATCH 1/5] mm: Use the correct page size when removing the page

From "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject [RFC PATCH 1/5] mm: Use the correct page size when removing the page
Date 2016-10-11 19:40 +0200
Message-ID <sr9bZ-195-37@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


We are removing a pmd hugepage here. Use the correct page size.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 mm/huge_memory.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 53ae6d00656a..3c9efdda0893 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1338,12 +1338,12 @@ int zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
 	if (vma_is_dax(vma)) {
 		spin_unlock(ptl);
 		if (is_huge_zero_pmd(orig_pmd))
-			tlb_remove_page(tlb, pmd_page(orig_pmd));
+			tlb_remove_page_size(tlb, pmd_page(orig_pmd), HPAGE_PMD_SIZE);
 	} else if (is_huge_zero_pmd(orig_pmd)) {
 		pte_free(tlb->mm, pgtable_trans_huge_withdraw(tlb->mm, pmd));
 		atomic_long_dec(&tlb->mm->nr_ptes);
 		spin_unlock(ptl);
-		tlb_remove_page(tlb, pmd_page(orig_pmd));
+		tlb_remove_page_size(tlb, pmd_page(orig_pmd), HPAGE_PMD_SIZE);
 	} else {
 		struct page *page = pmd_page(orig_pmd);
 		page_remove_rmap(page, true);
-- 
2.10.1

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH 1/5] mm: Use the correct page size when removing the page "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> - 2016-10-11 19:40 +0200
  [RFC PATCH 5/5] mm: Remove the page size change check in tlb_remove_page "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> - 2016-10-11 20:10 +0200
  [RFC PATCH 2/5] mm: Update mmu_gather range correctly "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> - 2016-10-11 20:10 +0200
  [RFC PATCH 4/5] mm: Add tlb_remove_check_page_size_change to track page size change "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> - 2016-10-11 20:10 +0200

csiph-web