linux-stable/mm/damon
Baolin Wang 49f4203aae mm/damon: add access checking for hugetlb pages
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
  ......

[baolin.wang@linux.alibaba.com: fix unused var warning]
  Link: https://lkml.kernel.org/r/1aaf9c11-0d8e-b92d-5c92-46e50a6e8d4e@linux.alibaba.com
[baolin.wang@linux.alibaba.com: v3]
  Link: https://lkml.kernel.org/r/486927ecaaaecf2e3a7fbe0378ec6e1c58b50747.1640852276.git.baolin.wang@linux.alibaba.com

Link: https://lkml.kernel.org/r/6afcbd1fda5f9c7c24f320d26a98188c727ceec3.1639623751.git.baolin.wang@linux.alibaba.com
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-01-15 16:30:33 +02:00
..
core-test.h mm/damon/core-test: fix wrong expectations for 'damon_split_regions_of()' 2021-10-28 17:18:55 -07:00
core.c mm/damon/schemes: account how many times quota limit has exceeded 2022-01-15 16:30:33 +02:00
dbgfs-test.h mm/damon: fix a few spelling mistakes in comments and a pr_debug message 2021-11-06 13:30:46 -07:00
dbgfs.c mm/damon/dbgfs: support all DAMOS stats 2022-01-15 16:30:33 +02:00
Kconfig mm/damon: introduce DAMON-based Reclamation (DAMON_RECLAIM) 2021-11-06 13:30:46 -07:00
Makefile mm/damon: introduce DAMON-based Reclamation (DAMON_RECLAIM) 2021-11-06 13:30:46 -07:00
paddr.c mm/damon/schemes: account scheme actions that successfully applied 2022-01-15 16:30:32 +02:00
prmtv-common.c mm/damon/vaddr,paddr: support pageout prioritization 2021-11-06 13:30:45 -07:00
prmtv-common.h mm/damon: move damon_rand() definition into damon.h 2022-01-15 16:30:32 +02:00
reclaim.c mm/damon/reclaim: provide reclamation statistics 2022-01-15 16:30:33 +02:00
vaddr-test.h mm/damon/vaddr-test: remove unnecessary variables 2021-12-10 17:10:56 -08:00
vaddr.c mm/damon: add access checking for hugetlb pages 2022-01-15 16:30:33 +02:00