From: Xin Hao <xhao@linux.alibaba.com>
To: sj@kernel.org
Cc: akpm@linux-foundation.org, damon@lists.linux.dev,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
xhao@linux.alibaba.com
Subject: [PATCH V1 2/2] mm/damon/core: remove duplicate check about THP
Date: Thu, 15 Sep 2022 22:22:37 +0800 [thread overview]
Message-ID: <20220915142237.92529-2-xhao@linux.alibaba.com> (raw)
In-Reply-To: <20220915142237.92529-1-xhao@linux.alibaba.com>
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@linux.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
next prev parent reply other threads:[~2022-09-15 14:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 14:22 [PATCH V1 1/2] mm/damon/sysfs: avoid call damon_target_has_pid() repeatedly Xin Hao
2022-09-15 14:22 ` Xin Hao [this message]
2022-09-15 21:54 ` [PATCH V1 2/2] mm/damon/core: remove duplicate check about THP kernel test robot
2022-09-15 22:26 ` Andrew Morton
2022-09-16 1:37 ` haoxin
2022-09-15 22:16 ` kernel test robot
2022-09-16 8:42 ` [PATCH V1 1/2] mm/damon/sysfs: avoid call damon_target_has_pid() repeatedly SeongJae Park
2022-09-16 8:57 ` haoxin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220915142237.92529-2-xhao@linux.alibaba.com \
--to=xhao@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox