mm/damon/core: use pseudo-moving sum for nr_accesses_bp
authorSeongJae Park <sj@kernel.org>
Fri, 15 Sep 2023 02:52:49 +0000 (02:52 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 4 Oct 2023 17:32:30 +0000 (10:32 -0700)
commitace30fb21af5f1be1605db72c16040b95b1557ef
tree354827f4ddb7ae02ee231fd953c83752b3236eb0
parent80333828ea7728ebe85d079bb5c1467eb9fc6c8c
mm/damon/core: use pseudo-moving sum for nr_accesses_bp

Let nr_accesses_bp be calculated as a pseudo-moving sum that updated for
every sampling interval, using damon_moving_sum().  This is assumed to be
useful for cases that the aggregation interval is set quite huge, but the
monivoting results need to be collected earlier than next aggregation
interval is passed.

Link: https://lkml.kernel.org/r/20230915025251.72816-7-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/damon.h
mm/damon/core.c
mm/damon/paddr.c
mm/damon/vaddr.c