mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 14:02:37 -04:00
mm/damon/sysfs-schemes: connect damos_quota_goal nid with core layer
DAMON sysfs interface file for DAMOS quota goal's node id argument is not passed to core layer. Implement the link. Link: https://lkml.kernel.org/r/20250420194030.75838-4-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Yunjeong Mun <yunjeong.mun@sk.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
0fbd59379d
commit
85fcf0ffc4
@@ -2149,8 +2149,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;
|
||||
|
||||
Reference in New Issue
Block a user