Commit afc93244 authored by Zhanbo Xiong's avatar Zhanbo Xiong Committed by Matthias Männich
Browse files

UPSTREAM: mm/damon/sysfs: handle 'state' file inputs for every sampling interval if possible

DAMON sysfs interface need to access kdamond-touching data for some of
kdamond user commands.  It uses ->after_aggregation() kdamond callback to safely access the data in the case.  It had to use the aggregation
interval callback because that was the only callback that users can access complete monitoring results.

Since patch series "mm/damon: provide pseudo-moving sum based access
rate", which starts from commit 78fbfb15 ("mm/damon/core: define and use a dedicated function for region access rate update"), DAMON provides good-to-use quality moitoring results for every sampling interval.  It aims to help users who need to quickly retrieve the monitoring results. When the aggregation interval is set too long and therefore waiting for the aggregation interval can degrade user experience, or when the access pattern is expected to be significantly changed[1] could be such cases.

However, because DAMON sysfs interface is still handling the commands per aggregation interval, the end user cannot get the benefit.  Update DAMON sysfs interface to handle kdamond commands for every sampling interval if applicable.  Specifically, all kdamond data accessing commands except 'commit' command are applicable.

[1] https://lore.kernel.org/r/20240129121316.GA9706@cuiyangpei

Link: https://lkml.kernel.org/r/20240206025158.203097-1-sj@kernel.org


Signed-off-by: default avatarSeongJae Park <sj@kernel.org>
Cc: xiongping1 <xiongping1@xiaomi.com>
(cherry picked from commit 6a080670)

Bug:361213181

Change-Id: I58b570928198136aa50feb3bff8c690ca4080e5e
Signed-off-by: default avatarZhanbo Xiong <xiongzhanbo@xiaomi.corp-partner.google.com>
parent 829cb56c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment