[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202209110332.WCgF6fnm-lkp@intel.com>
Date: Sun, 11 Sep 2022 03:16:58 +0800
From: kernel test robot <lkp@...el.com>
To: Xin Hao <xhao@...ux.alibaba.com>, sj@...nel.org
Cc: kbuild-all@...ts.01.org, akpm@...ux-foundation.org,
damon@...ts.linux.dev, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, xhao@...ux.alibaba.com
Subject: Re: [PATCH] mm/damon: simplify scheme create in
damon_lru_sort_apply_parameters
Hi Xin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on akpm-mm/mm-everything]
url: https://github.com/intel-lab-lkp/linux/commits/Xin-Hao/mm-damon-simplify-scheme-create-in-damon_lru_sort_apply_parameters/20220911-005630
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
config: x86_64-allyesconfig
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/d9938ea4d14a88832eee655cda52401891778dd5
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Xin-Hao/mm-damon-simplify-scheme-create-in-damon_lru_sort_apply_parameters/20220911-005630
git checkout d9938ea4d14a88832eee655cda52401891778dd5
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash mm/damon/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
mm/damon/lru_sort.c: In function 'damon_lru_sort_apply_parameters':
>> mm/damon/lru_sort.c:353:32: warning: unused variable 'next_scheme' [-Wunused-variable]
353 | struct damos *scheme, *next_scheme;
| ^~~~~~~~~~~
vim +/next_scheme +353 mm/damon/lru_sort.c
40e983cca9274e SeongJae Park 2022-06-13 350
40e983cca9274e SeongJae Park 2022-06-13 351 static int damon_lru_sort_apply_parameters(void)
40e983cca9274e SeongJae Park 2022-06-13 352 {
40e983cca9274e SeongJae Park 2022-06-13 @353 struct damos *scheme, *next_scheme;
40e983cca9274e SeongJae Park 2022-06-13 354 struct damon_addr_range addr_range;
40e983cca9274e SeongJae Park 2022-06-13 355 unsigned int hot_thres, cold_thres;
40e983cca9274e SeongJae Park 2022-06-13 356 int err = 0;
40e983cca9274e SeongJae Park 2022-06-13 357
40e983cca9274e SeongJae Park 2022-06-13 358 err = damon_set_attrs(ctx, sample_interval, aggr_interval, 0,
40e983cca9274e SeongJae Park 2022-06-13 359 min_nr_regions, max_nr_regions);
40e983cca9274e SeongJae Park 2022-06-13 360 if (err)
40e983cca9274e SeongJae Park 2022-06-13 361 return err;
40e983cca9274e SeongJae Park 2022-06-13 362
40e983cca9274e SeongJae Park 2022-06-13 363 /* aggr_interval / sample_interval is the maximum nr_accesses */
40e983cca9274e SeongJae Park 2022-06-13 364 hot_thres = aggr_interval / sample_interval * hot_thres_access_freq /
40e983cca9274e SeongJae Park 2022-06-13 365 1000;
40e983cca9274e SeongJae Park 2022-06-13 366 scheme = damon_lru_sort_new_hot_scheme(hot_thres);
40e983cca9274e SeongJae Park 2022-06-13 367 if (!scheme)
40e983cca9274e SeongJae Park 2022-06-13 368 return -ENOMEM;
d9938ea4d14a88 Xin Hao 2022-09-11 369 err = damon_set_schemes(ctx, &scheme, 1);
d9938ea4d14a88 Xin Hao 2022-09-11 370 if (err)
d9938ea4d14a88 Xin Hao 2022-09-11 371 return err;
40e983cca9274e SeongJae Park 2022-06-13 372
40e983cca9274e SeongJae Park 2022-06-13 373 cold_thres = cold_min_age / aggr_interval;
40e983cca9274e SeongJae Park 2022-06-13 374 scheme = damon_lru_sort_new_cold_scheme(cold_thres);
40e983cca9274e SeongJae Park 2022-06-13 375 if (!scheme)
40e983cca9274e SeongJae Park 2022-06-13 376 return -ENOMEM;
40e983cca9274e SeongJae Park 2022-06-13 377 damon_add_scheme(ctx, scheme);
40e983cca9274e SeongJae Park 2022-06-13 378
40e983cca9274e SeongJae Park 2022-06-13 379 if (monitor_region_start > monitor_region_end)
40e983cca9274e SeongJae Park 2022-06-13 380 return -EINVAL;
40e983cca9274e SeongJae Park 2022-06-13 381 if (!monitor_region_start && !monitor_region_end &&
dd7ecfcf662cdf Xin Hao 2022-09-09 382 !damon_find_biggest_system_ram(&monitor_region_start,
40e983cca9274e SeongJae Park 2022-06-13 383 &monitor_region_end))
40e983cca9274e SeongJae Park 2022-06-13 384 return -EINVAL;
40e983cca9274e SeongJae Park 2022-06-13 385 addr_range.start = monitor_region_start;
40e983cca9274e SeongJae Park 2022-06-13 386 addr_range.end = monitor_region_end;
40e983cca9274e SeongJae Park 2022-06-13 387 return damon_set_regions(target, &addr_range, 1);
40e983cca9274e SeongJae Park 2022-06-13 388 }
40e983cca9274e SeongJae Park 2022-06-13 389
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (289765 bytes)
Powered by blists - more mailing lists