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


Groups > linux.kernel > #1415072 > unrolled thread

[PATCHv9 12/32] thp: prepare change_huge_pmd() for file thp

Started by"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
First post2016-06-06 16:10 +0200
Last post2016-06-06 16:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCHv9 12/32] thp: prepare change_huge_pmd() for file thp "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-06 16:10 +0200

#1415072 — [PATCHv9 12/32] thp: prepare change_huge_pmd() for file thp

From"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Date2016-06-06 16:10 +0200
Subject[PATCHv9 12/32] thp: prepare change_huge_pmd() for file thp
Message-ID<rH3o7-5Yv-67@gated-at.bofh.it>
change_huge_pmd() has assert which is not relvant for file page.
For shared mapping it's perfectly fine to have page table entry
writable, without explicit mkwrite.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 mm/huge_memory.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 32974dee4250..cc13e262dbe1 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1794,7 +1794,8 @@ int change_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
 				entry = pmd_mkwrite(entry);
 			ret = HPAGE_PMD_NR;
 			set_pmd_at(mm, addr, pmd, entry);
-			BUG_ON(!preserve_write && pmd_write(entry));
+			BUG_ON(vma_is_anonymous(vma) && !preserve_write &&
+					pmd_write(entry));
 		}
 		spin_unlock(ptl);
 	}
-- 
2.8.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web