[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220915142237.92529-2-xhao@linux.alibaba.com>
Date: Thu, 15 Sep 2022 22:22:37 +0800
From: Xin Hao <xhao@...ux.alibaba.com>
To: sj@...nel.org
Cc: akpm@...ux-foundation.org, damon@...ts.linux.dev,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
xhao@...ux.alibaba.com
Subject: [PATCH V1 2/2] mm/damon/core: remove duplicate check about THP
In damon_young_pmd_entry(), it calls pmd_trans_huge() to check whether
the OS supports THP, if CONFIG_TRANSPARENT_HUGEPAGE is not included,
the pmd_trans_huge() will return 0.
Signed-off-by: Xin Hao <xhao@...ux.alibaba.com>
---
mm/damon/vaddr.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c
index 58bf1bbad530..21daaa5503fb 100644
--- a/mm/damon/vaddr.c
+++ b/mm/damon/vaddr.c
@@ -434,7 +434,6 @@ static int damon_young_pmd_entry(pmd_t *pmd, unsigned long addr,
struct page *page;
struct damon_young_walk_private *priv = walk->private;
-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
if (pmd_trans_huge(*pmd)) {
ptl = pmd_lock(walk->mm, pmd);
if (!pmd_present(*pmd)) {
@@ -462,7 +461,6 @@ static int damon_young_pmd_entry(pmd_t *pmd, unsigned long addr,
}
regular_page:
-#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd)))
return -EINVAL;
--
2.31.0
Powered by blists - more mailing lists