[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180205012754.23615-24-dbueso@wotan.suse.de>
Date: Mon, 5 Feb 2018 02:27:13 +0100
From: Davidlohr Bueso <dbueso@...e.de>
To: akpm@...ux-foundation.org, mingo@...nel.org
Cc: peterz@...radead.org, ldufour@...ux.vnet.ibm.com, jack@...e.cz,
mhocko@...nel.org, kirill.shutemov@...ux.intel.com,
mawilcox@...rosoft.com, mgorman@...hsingularity.net,
dave@...olabs.net, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: [PATCH 23/64] mm: huge pagecache: do not check mmap_sem state
From: Davidlohr Bueso <dave@...olabs.net>
*THIS IS A HACK*
By dropping the rwsem_is_locked checks in zap_pmd_range()
and zap_pud_range() we can avoid having to teach
file_operations about mmrange. For example in xfs:
iomap_dio_rw() is called by .read_iter file callbacks.
No-Yet-Signed-off-by: Davidlohr Bueso <dbueso@...e.de>
---
mm/memory.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/mm/memory.c b/mm/memory.c
index 7c69674cd9da..598a8c69e3d3 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1422,8 +1422,6 @@ static inline unsigned long zap_pmd_range(struct mmu_gather *tlb,
next = pmd_addr_end(addr, end);
if (is_swap_pmd(*pmd) || pmd_trans_huge(*pmd) || pmd_devmap(*pmd)) {
if (next - addr != HPAGE_PMD_SIZE) {
- VM_BUG_ON_VMA(vma_is_anonymous(vma) &&
- !rwsem_is_locked(&tlb->mm->mmap_sem), vma);
__split_huge_pmd(vma, pmd, addr, false, NULL);
} else if (zap_huge_pmd(tlb, vma, pmd, addr))
goto next;
@@ -1459,7 +1457,6 @@ static inline unsigned long zap_pud_range(struct mmu_gather *tlb,
next = pud_addr_end(addr, end);
if (pud_trans_huge(*pud) || pud_devmap(*pud)) {
if (next - addr != HPAGE_PUD_SIZE) {
- VM_BUG_ON_VMA(!rwsem_is_locked(&tlb->mm->mmap_sem), vma);
split_huge_pud(vma, pud, addr);
} else if (zap_huge_pud(tlb, vma, pud, addr))
goto next;
--
2.13.6
Powered by blists - more mailing lists