From: SeongJae Park <sj@kernel.org>
To: Usama Arif <usamaarif642@gmail.com>
Cc: SeongJae Park <sj@kernel.org>,
akpm@linux-foundation.org, damon@lists.linux.dev,
linux-mm@kvack.org
Subject: Re: [v1 2/2] mm/damon: introduce DAMOS filter type hugepage
Date: Fri, 17 Jan 2025 09:08:28 -0800 [thread overview]
Message-ID: <20250117170828.55772-1-sj@kernel.org> (raw)
In-Reply-To: <cc2aa18d-c494-4b50-b695-3cb84a1ee87c@gmail.com>
On Fri, 17 Jan 2025 11:02:05 +0000 Usama Arif <usamaarif642@gmail.com> wrote:
>
>
> On 16/01/2025 19:05, SeongJae Park wrote:
> > On Thu, 16 Jan 2025 14:44:36 +0000 Usama Arif <usamaarif642@gmail.com> wrote:
> >
> >> diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c
> >> index c0ccf4fade24..a9e69179d45c 100644
> >> --- a/mm/damon/paddr.c
> >> +++ b/mm/damon/paddr.c
> >> @@ -222,6 +222,9 @@ static bool damos_pa_filter_match(struct damos_filter *filter,
> >> if (matched)
> >> damon_folio_mkold(folio);
> >> break;
> >> + case DAMOS_FILTER_TYPE_HUGEPAGE:
> >> + matched = folio_size(folio) == HPAGE_PMD_SIZE;
> >> + break;
> >
> > This will make build fails when CONFIG_PGTABLE_HAS_HUGE_LEAVES is not set, like
> > below:
> >
> > /include/linux/compiler_types.h:542:45: error: call to ‘__compiletime_assert_321’ declared with attribute error: BUILD_BUG failed
> > 542 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> > | ^
> > [...]
> > /include/linux/huge_mm.h:111:35: note: in expansion of macro ‘HPAGE_PMD_SHIFT’
> > 111 | #define HPAGE_PMD_SIZE ((1UL) << HPAGE_PMD_SHIFT)
> > | ^~~~~~~~~~~~~~~
> > /mm/damon/paddr.c:321:48: note: in expansion of macro ‘HPAGE_PMD_SIZE’
> > 321 | matched = folio_size(folio) == HPAGE_PMD_SIZE;
> > | ^~~~~~~~~~~~~~
> >
> >
> > This simple test might help you reproducing it:
> > https://github.com/damonitor/damon-tests/blob/master/corr/tests/build_i386.sh
> >
> > What about enclosing the entire case with
> >
> > #if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLB_PAGE) ?
> >
>
> Ah Thanks for pointing this out! Would
>
> #if defined(CONFIG_PGTABLE_HAS_HUGE_LEAVES)
>
> be better?
Yes, that also looks good to me :)
Thanks,
SJ
next prev parent reply other threads:[~2025-01-17 17:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-16 14:44 [v1 1/2] mm/damon: have damon_get_folio return folio even for tail pages Usama Arif
2025-01-16 14:44 ` [v1 2/2] mm/damon: introduce DAMOS filter type hugepage Usama Arif
2025-01-16 15:15 ` Usama Arif
2025-01-16 19:07 ` SeongJae Park
2025-01-16 19:05 ` SeongJae Park
2025-01-17 11:02 ` Usama Arif
2025-01-17 17:08 ` SeongJae Park [this message]
2025-01-18 8:09 ` kernel test robot
2025-01-18 10:34 ` kernel test robot
2025-01-16 18:49 ` [v1 1/2] mm/damon: have damon_get_folio return folio even for tail pages SeongJae Park
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=20250117170828.55772-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=linux-mm@kvack.org \
--cc=usamaarif642@gmail.com \
/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