From: Yun Levi <ppbuk5246@gmail.com>
To: SeongJae Park <sj@kernel.org>
Cc: akpm@linux-foundation.org, damon@lists.linux.dev,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] damon: Use pmdp_get instead of drect dereferencing pmd.
Date: Thu, 27 Jul 2023 22:15:49 +0100 [thread overview]
Message-ID: <CAM7-yPQp-3BRcuFjOfEfdsMzUNU2bswKWAdQpOe_3gV1TyH5AQ@mail.gmail.com> (raw)
In-Reply-To: <20230727195453.67611-1-sj@kernel.org>
Hi SJ.
Thanks for looking into this.
> Nit for the subject, what about s/drect/directly/? Also, let's remove the
> period at the end.
>
> On Fri, 28 Jul 2023 03:37:45 +0900 Levi Yun <ppbuk5246@gmail.com> wrote:
Thanks. But I don't know why period is added thou I sent via git send-email ..
> > - if (pmd_trans_huge(*pmd)) {
> > + if (pmd_trans_huge(pmdp_get_lockless(pmd))) {
>
> I don't think we really need to use pmdp_get_lockless() here, since we will do
> this check again with the lock, and we have the fallback for the intermediate
> changes.
Agree. I'll change. Thanks :)
> > @@ -434,26 +437,29 @@ static int damon_young_pmd_entry(pmd_t *pmd, unsigned long addr,
> > {
> > pte_t *pte;
> > pte_t ptent;
> > + pmd_t pmde;
>
> This would cause below build warning if CONFIG_TRANSPARENT_HUGEPAGE is not
> defined.
>
> .../mm/damon/vaddr.c:440:8: warning: unused variable 'pmde' [-Wunused-variable]
> 440 | pmd_t pmde;
> | ^~~~
>
>
> > spinlock_t *ptl;
> > struct folio *folio;
> > struct damon_young_walk_private *priv = walk->private;
> >
> > #ifdef CONFIG_TRANSPARENT_HUGEPAGE
> > - if (pmd_trans_huge(*pmd)) {
> > + if (pmd_trans_huge(pmdp_get_lockless(pmd))) {
Oh.. I miss this. Many thanks..!
> Thanks,
> SJ
Many Thanks..!
---------
Sincerely,
Levi.
next prev parent reply other threads:[~2023-07-27 21:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 18:37 Levi Yun
2023-07-27 19:54 ` SeongJae Park
2023-07-27 21:15 ` Yun Levi [this message]
2023-07-28 8:08 ` kernel test robot
2023-07-28 8:18 ` Yun Levi
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=CAM7-yPQp-3BRcuFjOfEfdsMzUNU2bswKWAdQpOe_3gV1TyH5AQ@mail.gmail.com \
--to=ppbuk5246@gmail.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