mm/damon/reclaim.c:252:15: error: implicit declaration of function 'damon_commit_ctx'
From: kernel test robot
Date: Tue Oct 01 2024 - 14:09:51 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e32cde8d2bd7d251a8f9b434143977ddf13dcec6
commit: 11ddcfc257a3e8d7b13b42148ee7e783f4876da4 mm/damon/reclaim: use damon_commit_ctx()
date: 3 months ago
config: x86_64-randconfig-001-20231120 (https://download.01.org/0day-ci/archive/20241002/202410020227.oOh0SBIj-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241002/202410020227.oOh0SBIj-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410020227.oOh0SBIj-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
In file included from include/linux/sched.h:38,
from include/linux/cgroup.h:12,
from include/linux/memcontrol.h:13,
from include/linux/damon.h:11,
from mm/damon/reclaim.c:10:
include/linux/mm_types_task.h:19:45: warning: "CONFIG_SPLIT_PTLOCK_CPUS" is not defined, evaluates to 0 [-Wundef]
19 | #define USE_SPLIT_PTE_PTLOCKS (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mm.h:2890:5: note: in expansion of macro 'USE_SPLIT_PTE_PTLOCKS'
2890 | #if USE_SPLIT_PTE_PTLOCKS
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types_task.h:19:45: warning: "CONFIG_SPLIT_PTLOCK_CPUS" is not defined, evaluates to 0 [-Wundef]
19 | #define USE_SPLIT_PTE_PTLOCKS (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS)
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types_task.h:20:34: note: in expansion of macro 'USE_SPLIT_PTE_PTLOCKS'
20 | #define USE_SPLIT_PMD_PTLOCKS (USE_SPLIT_PTE_PTLOCKS && \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/mm.h:3012:5: note: in expansion of macro 'USE_SPLIT_PMD_PTLOCKS'
3012 | #if USE_SPLIT_PMD_PTLOCKS
| ^~~~~~~~~~~~~~~~~~~~~
mm/damon/reclaim.c: In function 'damon_reclaim_new_scheme':
mm/damon/reclaim.c:171:16: error: implicit declaration of function 'damon_new_scheme'; did you mean 'damon_for_each_scheme'? [-Werror=implicit-function-declaration]
171 | return damon_new_scheme(
| ^~~~~~~~~~~~~~~~
| damon_for_each_scheme
mm/damon/reclaim.c:171:16: warning: returning 'int' from a function with return type 'struct damos *' makes pointer from integer without a cast [-Wint-conversion]
171 | return damon_new_scheme(
| ^~~~~~~~~~~~~~~~~
172 | &pattern,
| ~~~~~~~~~
173 | /* page out those, as soon as found */
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
174 | DAMOS_PAGEOUT,
| ~~~~~~~~~~~~~~
175 | /* for each aggregation interval */
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
176 | 0,
| ~~
177 | /* under the quota. */
| ~~~~~~~~~~~~~~~~~~~~~~
178 | &damon_reclaim_quota,
| ~~~~~~~~~~~~~~~~~~~~~
179 | /* (De)activate this according to the watermarks. */
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
180 | &damon_reclaim_wmarks,
| ~~~~~~~~~~~~~~~~~~~~~~
181 | NUMA_NO_NODE);
| ~~~~~~~~~~~~~
mm/damon/reclaim.c: In function 'damon_reclaim_apply_parameters':
mm/damon/reclaim.c:209:15: error: implicit declaration of function 'damon_set_attrs' [-Werror=implicit-function-declaration]
209 | err = damon_set_attrs(ctx, &damon_reclaim_mon_attrs);
| ^~~~~~~~~~~~~~~
mm/damon/reclaim.c:222:9: error: implicit declaration of function 'damon_set_schemes' [-Werror=implicit-function-declaration]
222 | damon_set_schemes(ctx, &scheme, 1);
| ^~~~~~~~~~~~~~~~~
mm/damon/reclaim.c:225:24: error: implicit declaration of function 'damos_new_quota_goal'; did you mean 'damos_for_each_quota_goal'? [-Werror=implicit-function-declaration]
225 | goal = damos_new_quota_goal(DAMOS_QUOTA_SOME_MEM_PSI_US,
| ^~~~~~~~~~~~~~~~~~~~
| damos_for_each_quota_goal
mm/damon/reclaim.c:225:22: warning: assignment to 'struct damos_quota_goal *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
225 | goal = damos_new_quota_goal(DAMOS_QUOTA_SOME_MEM_PSI_US,
| ^
mm/damon/reclaim.c:229:17: error: implicit declaration of function 'damos_add_quota_goal'; did you mean 'damos_for_each_quota_goal'? [-Werror=implicit-function-declaration]
229 | damos_add_quota_goal(&scheme->quota, goal);
| ^~~~~~~~~~~~~~~~~~~~
| damos_for_each_quota_goal
mm/damon/reclaim.c:233:22: warning: assignment to 'struct damos_quota_goal *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
233 | goal = damos_new_quota_goal(DAMOS_QUOTA_USER_INPUT, 10000);
| ^
mm/damon/reclaim.c:241:26: error: implicit declaration of function 'damos_new_filter'; did you mean 'damos_for_each_filter'? [-Werror=implicit-function-declaration]
241 | filter = damos_new_filter(DAMOS_FILTER_TYPE_ANON, true);
| ^~~~~~~~~~~~~~~~
| damos_for_each_filter
mm/damon/reclaim.c:241:24: warning: assignment to 'struct damos_filter *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
241 | filter = damos_new_filter(DAMOS_FILTER_TYPE_ANON, true);
| ^
mm/damon/reclaim.c:244:17: error: implicit declaration of function 'damos_add_filter'; did you mean 'damos_for_each_filter'? [-Werror=implicit-function-declaration]
244 | damos_add_filter(scheme, filter);
| ^~~~~~~~~~~~~~~~
| damos_for_each_filter
mm/damon/reclaim.c:247:15: error: implicit declaration of function 'damon_set_region_biggest_system_ram_default' [-Werror=implicit-function-declaration]
247 | err = damon_set_region_biggest_system_ram_default(param_target,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/damon/reclaim.c:252:15: error: implicit declaration of function 'damon_commit_ctx' [-Werror=implicit-function-declaration]
252 | err = damon_commit_ctx(ctx, param_ctx);
| ^~~~~~~~~~~~~~~~
>> mm/damon/reclaim.c:254:9: error: implicit declaration of function 'damon_destroy_ctx'; did you mean 'mm_destroy_cid'? [-Werror=implicit-function-declaration]
254 | damon_destroy_ctx(param_ctx);
| ^~~~~~~~~~~~~~~~~
| mm_destroy_cid
mm/damon/reclaim.c: In function 'damon_reclaim_turn':
mm/damon/reclaim.c:263:23: error: implicit declaration of function 'damon_stop' [-Werror=implicit-function-declaration]
263 | err = damon_stop(&ctx, 1);
| ^~~~~~~~~~
mm/damon/reclaim.c:273:15: error: implicit declaration of function 'damon_start' [-Werror=implicit-function-declaration]
273 | err = damon_start(&ctx, 1, true);
| ^~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/damon_commit_ctx +252 mm/damon/reclaim.c
195
196 static int damon_reclaim_apply_parameters(void)
197 {
198 struct damon_ctx *param_ctx;
199 struct damon_target *param_target;
200 struct damos *scheme, *old_scheme;
201 struct damos_quota_goal *goal;
202 struct damos_filter *filter;
203 int err;
204
205 err = damon_modules_new_paddr_ctx_target(¶m_ctx, ¶m_target);
206 if (err)
207 return err;
208
209 err = damon_set_attrs(ctx, &damon_reclaim_mon_attrs);
210 if (err)
211 goto out;
212
213 err = -ENOMEM;
214 scheme = damon_reclaim_new_scheme();
215 if (!scheme)
216 goto out;
217 if (!list_empty(&ctx->schemes)) {
218 damon_for_each_scheme(old_scheme, ctx)
219 damon_reclaim_copy_quota_status(&scheme->quota,
220 &old_scheme->quota);
221 }
222 damon_set_schemes(ctx, &scheme, 1);
223
224 if (quota_mem_pressure_us) {
225 goal = damos_new_quota_goal(DAMOS_QUOTA_SOME_MEM_PSI_US,
226 quota_mem_pressure_us);
227 if (!goal)
228 goto out;
229 damos_add_quota_goal(&scheme->quota, goal);
230 }
231
232 if (quota_autotune_feedback) {
233 goal = damos_new_quota_goal(DAMOS_QUOTA_USER_INPUT, 10000);
234 if (!goal)
235 goto out;
236 goal->current_value = quota_autotune_feedback;
237 damos_add_quota_goal(&scheme->quota, goal);
238 }
239
240 if (skip_anon) {
241 filter = damos_new_filter(DAMOS_FILTER_TYPE_ANON, true);
242 if (!filter)
243 goto out;
244 damos_add_filter(scheme, filter);
245 }
246
247 err = damon_set_region_biggest_system_ram_default(param_target,
248 &monitor_region_start,
249 &monitor_region_end);
250 if (err)
251 goto out;
> 252 err = damon_commit_ctx(ctx, param_ctx);
253 out:
> 254 damon_destroy_ctx(param_ctx);
255 return err;
256 }
257
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki