Message ID | 20250320053937.57734-4-sj@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | mm/damon: let DAMON-based memory tiering self-tuned and just works | expand |
diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c index 8c51906c8268..e85559b16d6e 100644 --- a/mm/damon/sysfs-schemes.c +++ b/mm/damon/sysfs-schemes.c @@ -2153,8 +2153,17 @@ static int damos_sysfs_add_quota_score( sysfs_goal->target_value); if (!goal) return -ENOMEM; - if (sysfs_goal->metric == DAMOS_QUOTA_USER_INPUT) + switch (sysfs_goal->metric) { + case DAMOS_QUOTA_USER_INPUT: goal->current_value = sysfs_goal->current_value; + break; + case DAMOS_QUOTA_NODE_MEM_USED_BP: + case DAMOS_QUOTA_NODE_MEM_FREE_BP: + goal->nid = sysfs_goal->nid; + break; + default: + break; + } damos_add_quota_goal(quota, goal); } return 0;
DAMON sysfs interface file for DAMOS quota goal's node id argument is not passed to core layer. Implement the link. Signed-off-by: SeongJae Park <sj@kernel.org> --- mm/damon/sysfs-schemes.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)