]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/damon: use set_huge_pte_at() to make huge pte old
authorBaolin Wang <baolin.wang@linux.alibaba.com>
Mon, 20 Jun 2022 02:34:42 +0000 (10:34 +0800)
committerakpm <akpm@linux-foundation.org>
Sun, 26 Jun 2022 22:39:47 +0000 (15:39 -0700)
commit33154d0c186873b4a23a7cd0def202ffc143cbc2
tree77ca6d10720db6efe4dc600dc1659d537d481912
parent4c79e13f87f690ab537e6edd0d70d0587497b535
mm/damon: use set_huge_pte_at() to make huge pte old

The huge_ptep_set_access_flags() can not make the huge pte old according
to the discussion [1], that means we will always mornitor the young state
of the hugetlb though we stopped accessing the hugetlb, as a result DAMON
will get inaccurate accessing statistics.

So changing to use set_huge_pte_at() to make the huge pte old to fix this
issue.

[1] https://lore.kernel.org/all/Yqy97gXI4Nqb7dYo@arm.com/

Link: https://lkml.kernel.org/r/1655692482-28797-1-git-send-email-baolin.wang@linux.alibaba.com
Fixes: 49f4203aae06 ("mm/damon: add access checking for hugetlb pages")
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Acked-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/vaddr.c