All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [sj:damon/next 32/42] mm/damon/core.c:1150 damos_set_effective_quota() error: uninitialized symbol 'esz'.
Date: Tue, 21 Nov 2023 04:01:55 +0800	[thread overview]
Message-ID: <202311210420.URG3QSAS-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: SeongJae Park <sj@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sj/linux.git damon/next
head:   54ffd8ae08121d8cbce1874fe46970cce643a2c7
commit: 28cef0e565adbb4175f12ffffce9d0680979de60 [32/42] mm/damon/core: implement goal-oriented feedback-driven quota auto-tuning
:::::: branch date: 24 hours ago
:::::: commit date: 25 hours ago
config: x86_64-randconfig-161-20231121 (https://download.01.org/0day-ci/archive/20231121/202311210420.URG3QSAS-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce: (https://download.01.org/0day-ci/archive/20231121/202311210420.URG3QSAS-lkp@intel.com/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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202311210420.URG3QSAS-lkp@intel.com/

smatch warnings:
mm/damon/core.c:1150 damos_set_effective_quota() error: uninitialized symbol 'esz'.

vim +/esz +1150 mm/damon/core.c

28cef0e565adbb SeongJae Park 2023-10-27  1125  
28cef0e565adbb SeongJae Park 2023-10-27  1126  /* Shouldn't be called if quota->ms, quota->sz, and quota->get_score unset */
1cd2430300594a SeongJae Park 2021-11-05  1127  static void damos_set_effective_quota(struct damos_quota *quota)
1cd2430300594a SeongJae Park 2021-11-05  1128  {
1cd2430300594a SeongJae Park 2021-11-05  1129  	unsigned long throughput;
1cd2430300594a SeongJae Park 2021-11-05  1130  	unsigned long esz;
1cd2430300594a SeongJae Park 2021-11-05  1131  
28cef0e565adbb SeongJae Park 2023-10-27  1132  	if (!quota->ms && !quota->get_score) {
1cd2430300594a SeongJae Park 2021-11-05  1133  		quota->esz = quota->sz;
1cd2430300594a SeongJae Park 2021-11-05  1134  		return;
1cd2430300594a SeongJae Park 2021-11-05  1135  	}
1cd2430300594a SeongJae Park 2021-11-05  1136  
28cef0e565adbb SeongJae Park 2023-10-27  1137  	if (quota->get_score) {
28cef0e565adbb SeongJae Park 2023-10-27  1138  		quota->esz_bp = damon_feed_loop_next_input(
28cef0e565adbb SeongJae Park 2023-10-27  1139  				max(quota->esz_bp, 10000UL),
28cef0e565adbb SeongJae Park 2023-10-27  1140  				quota->get_score(quota->get_score_arg));
28cef0e565adbb SeongJae Park 2023-10-27  1141  		esz = quota->esz_bp / 10000;
28cef0e565adbb SeongJae Park 2023-10-27  1142  	}
28cef0e565adbb SeongJae Park 2023-10-27  1143  
28cef0e565adbb SeongJae Park 2023-10-27  1144  	if (quota->ms) {
1cd2430300594a SeongJae Park 2021-11-05  1145  		if (quota->total_charged_ns)
1cd2430300594a SeongJae Park 2021-11-05  1146  			throughput = quota->total_charged_sz * 1000000 /
1cd2430300594a SeongJae Park 2021-11-05  1147  				quota->total_charged_ns;
1cd2430300594a SeongJae Park 2021-11-05  1148  		else
1cd2430300594a SeongJae Park 2021-11-05  1149  			throughput = PAGE_SIZE * 1024;
28cef0e565adbb SeongJae Park 2023-10-27 @1150  		esz = min(throughput * quota->ms, esz);
28cef0e565adbb SeongJae Park 2023-10-27  1151  	}
1cd2430300594a SeongJae Park 2021-11-05  1152  
1cd2430300594a SeongJae Park 2021-11-05  1153  	if (quota->sz && quota->sz < esz)
1cd2430300594a SeongJae Park 2021-11-05  1154  		esz = quota->sz;
28cef0e565adbb SeongJae Park 2023-10-27  1155  
1cd2430300594a SeongJae Park 2021-11-05  1156  	quota->esz = esz;
1cd2430300594a SeongJae Park 2021-11-05  1157  }
1cd2430300594a SeongJae Park 2021-11-05  1158  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2023-11-20 20:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-20 20:01 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-11-21  7:37 [sj:damon/next 32/42] mm/damon/core.c:1150 damos_set_effective_quota() error: uninitialized symbol 'esz' Dan Carpenter
2023-11-21 17:36 ` SeongJae Park
2023-11-22  9:13   ` Dan Carpenter
2023-11-22 18:50     ` SeongJae Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202311210420.URG3QSAS-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.