mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01: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:
parent
0fbd59379d
commit
85fcf0ffc4
|
|
@ -2149,8 +2149,17 @@ static int damos_sysfs_add_quota_score(
|
||||||
sysfs_goal->target_value);
|
sysfs_goal->target_value);
|
||||||
if (!goal)
|
if (!goal)
|
||||||
return -ENOMEM;
|
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;
|
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);
|
damos_add_quota_goal(quota, goal);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user