Re: [PATCH v3] mm/damon: Add access checking for hugetlb pages

From: Baolin Wang
Date: Mon Jan 03 2022 - 21:35:17 EST


Hi SeongJae,

On 12/31/2021 2:19 AM, SeongJae Park wrote:
On Thu, 30 Dec 2021 16:20:28 +0800 Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx> wrote:

The process's VMAs can be mapped by hugetlb page, but now the DAMON
did not implement the access checking for hugetlb pte, so we can not
get the actual access count like below if a process VMAs were mapped
by hugetlb.

damon_aggregated: target_id=18446614368406014464 nr_regions=12 4194304-5476352: 0 545
damon_aggregated: target_id=18446614368406014464 nr_regions=12 140662370467840-140662372970496: 0 545
damon_aggregated: target_id=18446614368406014464 nr_regions=12 140662372970496-140662375460864: 0 545
damon_aggregated: target_id=18446614368406014464 nr_regions=12 140662375460864-140662377951232: 0 545
damon_aggregated: target_id=18446614368406014464 nr_regions=12 140662377951232-140662380449792: 0 545
damon_aggregated: target_id=18446614368406014464 nr_regions=12 140662380449792-140662382944256: 0 545
......

Thus this patch adds hugetlb access checking support, with this patch
we can see below VMA mapped by hugetlb access count.

damon_aggregated: target_id=18446613056935405824 nr_regions=12 140296486649856-140296489914368: 1 3
damon_aggregated: target_id=18446613056935405824 nr_regions=12 140296489914368-140296492978176: 1 3
damon_aggregated: target_id=18446613056935405824 nr_regions=12 140296492978176-140296495439872: 1 3
damon_aggregated: target_id=18446613056935405824 nr_regions=12 140296495439872-140296498311168: 1 3
damon_aggregated: target_id=18446613056935405824 nr_regions=12 140296498311168-140296501198848: 1 3
damon_aggregated: target_id=18446613056935405824 nr_regions=12 140296501198848-140296504320000: 1 3
damon_aggregated: target_id=18446613056935405824 nr_regions=12 140296504320000-140296507568128: 1 2
......

Signed-off-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>

In addition to unwrapping program outputs in commit message, I personally
prefer indenting those with 4 spaces[1], but I wouldn't bother you for such a
trivial thing. Thank you for this patch!

I noticed your comments before, but I still think the message line is too long to unreadable. Anyway thanks for your reviewing.


Reviewed-by: SeongJae Park <sj@xxxxxxxxxx>

[1] https://lore.kernel.org/linux-mm/17421c73-2124-63c2-1925-dcea5c976711@xxxxxxxxxxxxxxxx