* mm/damon/core.c:2050 damos_adjust_quota() error: uninitialized symbol 'cached_esz'.
@ 2025-10-16 15:29 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-10-16 15:29 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: SeongJae Park <sj@kernel.org>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7ea30958b3054f5e488fa0b33c352723f7ab3a2a
commit: a86d695193bfab3f130f9275c275e4e143dcd2e3 mm/damon: add trace event for effective size quota
date: 3 months ago
:::::: branch date: 17 hours ago
:::::: commit date: 3 months ago
config: i386-randconfig-141-20251016 (https://download.01.org/0day-ci/archive/20251016/202510162333.YNUPa5FO-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202510162333.YNUPa5FO-lkp@intel.com/
smatch warnings:
mm/damon/core.c:2050 damos_adjust_quota() error: uninitialized symbol 'cached_esz'.
vim +/cached_esz +2050 mm/damon/core.c
a86d695193bfab3 SeongJae Park 2025-07-04 2027
898810e5ca54691 SeongJae Park 2022-10-26 2028 static void damos_adjust_quota(struct damon_ctx *c, struct damos *s)
1f366e421c8f695 SeongJae Park 2021-11-05 2029 {
2b8a248d5873343 SeongJae Park 2021-11-05 2030 struct damos_quota *quota = &s->quota;
898810e5ca54691 SeongJae Park 2022-10-26 2031 struct damon_target *t;
898810e5ca54691 SeongJae Park 2022-10-26 2032 struct damon_region *r;
a86d695193bfab3 SeongJae Park 2025-07-04 2033 unsigned long cumulated_sz, cached_esz;
38683e003153f7a SeongJae Park 2021-11-05 2034 unsigned int score, max_score = 0;
2b8a248d5873343 SeongJae Park 2021-11-05 2035
89d347a545a704e SeongJae Park 2024-02-19 2036 if (!quota->ms && !quota->sz && list_empty("a->goals))
898810e5ca54691 SeongJae Park 2022-10-26 2037 return;
2b8a248d5873343 SeongJae Park 2021-11-05 2038
2b8a248d5873343 SeongJae Park 2021-11-05 2039 /* New charge window starts */
2b8a248d5873343 SeongJae Park 2021-11-05 2040 if (time_after_eq(jiffies, quota->charged_from +
898810e5ca54691 SeongJae Park 2022-10-26 2041 msecs_to_jiffies(quota->reset_interval))) {
6268eac34ca30af SeongJae Park 2022-01-14 2042 if (quota->esz && quota->charged_sz >= quota->esz)
6268eac34ca30af SeongJae Park 2022-01-14 2043 s->stat.qt_exceeds++;
1cd2430300594a2 SeongJae Park 2021-11-05 2044 quota->total_charged_sz += quota->charged_sz;
2b8a248d5873343 SeongJae Park 2021-11-05 2045 quota->charged_from = jiffies;
2b8a248d5873343 SeongJae Park 2021-11-05 2046 quota->charged_sz = 0;
a86d695193bfab3 SeongJae Park 2025-07-04 2047 if (trace_damos_esz_enabled())
a86d695193bfab3 SeongJae Park 2025-07-04 2048 cached_esz = quota->esz;
1cd2430300594a2 SeongJae Park 2021-11-05 2049 damos_set_effective_quota(quota);
a86d695193bfab3 SeongJae Park 2025-07-04 @2050 if (trace_damos_esz_enabled() && quota->esz != cached_esz)
a86d695193bfab3 SeongJae Park 2025-07-04 2051 damos_trace_esz(c, s, quota);
2b8a248d5873343 SeongJae Park 2021-11-05 2052 }
38683e003153f7a SeongJae Park 2021-11-05 2053
f7d911c39cbbb88 SeongJae Park 2022-03-22 2054 if (!c->ops.get_scheme_score)
898810e5ca54691 SeongJae Park 2022-10-26 2055 return;
38683e003153f7a SeongJae Park 2021-11-05 2056
38683e003153f7a SeongJae Park 2021-11-05 2057 /* Fill up the score histogram */
304b95847f28520 SeongJae Park 2024-08-25 2058 memset(c->regions_score_histogram, 0,
304b95847f28520 SeongJae Park 2024-08-25 2059 sizeof(*c->regions_score_histogram) *
304b95847f28520 SeongJae Park 2024-08-25 2060 (DAMOS_MAX_SCORE + 1));
38683e003153f7a SeongJae Park 2021-11-05 2061 damon_for_each_target(t, c) {
38683e003153f7a SeongJae Park 2021-11-05 2062 damon_for_each_region(r, t) {
38683e003153f7a SeongJae Park 2021-11-05 2063 if (!__damos_valid_target(r, s))
38683e003153f7a SeongJae Park 2021-11-05 2064 continue;
898810e5ca54691 SeongJae Park 2022-10-26 2065 score = c->ops.get_scheme_score(c, t, r, s);
304b95847f28520 SeongJae Park 2024-08-25 2066 c->regions_score_histogram[score] +=
304b95847f28520 SeongJae Park 2024-08-25 2067 damon_sz_region(r);
38683e003153f7a SeongJae Park 2021-11-05 2068 if (score > max_score)
38683e003153f7a SeongJae Park 2021-11-05 2069 max_score = score;
38683e003153f7a SeongJae Park 2021-11-05 2070 }
38683e003153f7a SeongJae Park 2021-11-05 2071 }
38683e003153f7a SeongJae Park 2021-11-05 2072
38683e003153f7a SeongJae Park 2021-11-05 2073 /* Set the min score limit */
38683e003153f7a SeongJae Park 2021-11-05 2074 for (cumulated_sz = 0, score = max_score; ; score--) {
304b95847f28520 SeongJae Park 2024-08-25 2075 cumulated_sz += c->regions_score_histogram[score];
38683e003153f7a SeongJae Park 2021-11-05 2076 if (cumulated_sz >= quota->esz || !score)
38683e003153f7a SeongJae Park 2021-11-05 2077 break;
38683e003153f7a SeongJae Park 2021-11-05 2078 }
38683e003153f7a SeongJae Park 2021-11-05 2079 quota->min_score = score;
2b8a248d5873343 SeongJae Park 2021-11-05 2080 }
1f366e421c8f695 SeongJae Park 2021-11-05 2081
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-10-16 15:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-16 15:29 mm/damon/core.c:2050 damos_adjust_quota() error: uninitialized symbol 'cached_esz' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.