[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230704213932.1339204-2-shikemeng@huaweicloud.com>
Date: Wed, 5 Jul 2023 05:39:31 +0800
From: Kemeng Shi <shikemeng@...weicloud.com>
To: akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Cc: shikemeng@...weicloud.com
Subject: [PATCH 1/2] mm: remove redundant check in page_vma_mapped_walk
For PVMW_SYNC case, we always take pte lock when get first pte of
PTE-mapped THP in map_pte and hold it until:
1. scan of pmd range finished or
2. scan of user input range finished or
3. user stop walk with page_vma_mapped_walk_done.
In each case. pte lock will not be freed during middle scan of PTE-mapped
THP.
Signed-off-by: Kemeng Shi <shikemeng@...weicloud.com>
---
mm/page_vma_mapped.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/mm/page_vma_mapped.c b/mm/page_vma_mapped.c
index 4e448cfbc6ef..83858758e239 100644
--- a/mm/page_vma_mapped.c
+++ b/mm/page_vma_mapped.c
@@ -275,10 +275,6 @@ bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw)
goto restart;
}
pvmw->pte++;
- if ((pvmw->flags & PVMW_SYNC) && !pvmw->ptl) {
- pvmw->ptl = pte_lockptr(mm, pvmw->pmd);
- spin_lock(pvmw->ptl);
- }
} while (pte_none(*pvmw->pte));
if (!pvmw->ptl) {
--
2.30.0
Powered by blists - more mailing lists