From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [openeuler:OLK-6.6 1351/1351] fs/resctrl/monitor.c:222 resctrl_find_cleanest_closid() warn: iterator 'i' not incremented
Date: Tue, 5 Nov 2024 22:44:52 +0800 [thread overview]
Message-ID: <202411060018.LrrsbbHA-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: kernel@openeuler.org
TO: Zeng Heng <zengheng4@huawei.com>
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: be25139622a639593fdb2e34ef7c259833956980
commit: 13e249bf4944afceae17195b7bb77c767ff61384 [1351/1351] x86/resctrl: Move the filesystem portions of resctrl to live in '/fs/'
:::::: branch date: 5 hours ago
:::::: commit date: 10 months ago
config: x86_64-randconfig-161-20241103 (https://download.01.org/0day-ci/archive/20241106/202411060018.LrrsbbHA-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
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/202411060018.LrrsbbHA-lkp@intel.com/
smatch warnings:
fs/resctrl/monitor.c:222 resctrl_find_cleanest_closid() warn: iterator 'i' not incremented
vim +/i +222 fs/resctrl/monitor.c
13e249bf4944af James Morse 2024-01-22 206
13e249bf4944af James Morse 2024-01-22 207 /**
13e249bf4944af James Morse 2024-01-22 208 * resctrl_find_cleanest_closid() - Find a CLOSID where all the associated
13e249bf4944af James Morse 2024-01-22 209 * RMID are clean, or the CLOSID that has
13e249bf4944af James Morse 2024-01-22 210 * the most clean RMID.
13e249bf4944af James Morse 2024-01-22 211 *
13e249bf4944af James Morse 2024-01-22 212 * MPAM's equivalent of RMID are per-CLOSID, meaning a freshly allocated CLOSID
13e249bf4944af James Morse 2024-01-22 213 * may not be able to allocate clean RMID. To avoid this the allocator will
13e249bf4944af James Morse 2024-01-22 214 * choose the CLOSID with the most clean RMID.
13e249bf4944af James Morse 2024-01-22 215 *
13e249bf4944af James Morse 2024-01-22 216 * When the CLOSID and RMID are independent numbers, the first free CLOSID will
13e249bf4944af James Morse 2024-01-22 217 * be returned.
13e249bf4944af James Morse 2024-01-22 218 */
13e249bf4944af James Morse 2024-01-22 219 int resctrl_find_cleanest_closid(void)
13e249bf4944af James Morse 2024-01-22 220 {
13e249bf4944af James Morse 2024-01-22 221 u32 cleanest_closid = ~0;
13e249bf4944af James Morse 2024-01-22 @222 int i = 0;
13e249bf4944af James Morse 2024-01-22 223
13e249bf4944af James Morse 2024-01-22 224 lockdep_assert_held(&rdtgroup_mutex);
13e249bf4944af James Morse 2024-01-22 225
13e249bf4944af James Morse 2024-01-22 226 if (!IS_ENABLED(CONFIG_RESCTRL_RMID_DEPENDS_ON_CLOSID))
13e249bf4944af James Morse 2024-01-22 227 return -EIO;
13e249bf4944af James Morse 2024-01-22 228
13e249bf4944af James Morse 2024-01-22 229 for (i = 0; i < closids_supported(); i++) {
13e249bf4944af James Morse 2024-01-22 230 int num_dirty;
13e249bf4944af James Morse 2024-01-22 231
13e249bf4944af James Morse 2024-01-22 232 if (closid_allocated(i))
13e249bf4944af James Morse 2024-01-22 233 continue;
13e249bf4944af James Morse 2024-01-22 234
13e249bf4944af James Morse 2024-01-22 235 num_dirty = closid_num_dirty_rmid[i];
13e249bf4944af James Morse 2024-01-22 236 if (num_dirty == 0)
13e249bf4944af James Morse 2024-01-22 237 return i;
13e249bf4944af James Morse 2024-01-22 238
13e249bf4944af James Morse 2024-01-22 239 if (cleanest_closid == ~0)
13e249bf4944af James Morse 2024-01-22 240 cleanest_closid = i;
13e249bf4944af James Morse 2024-01-22 241
13e249bf4944af James Morse 2024-01-22 242 if (num_dirty < closid_num_dirty_rmid[cleanest_closid])
13e249bf4944af James Morse 2024-01-22 243 cleanest_closid = i;
13e249bf4944af James Morse 2024-01-22 244 }
13e249bf4944af James Morse 2024-01-22 245
13e249bf4944af James Morse 2024-01-22 246 if (cleanest_closid == ~0)
13e249bf4944af James Morse 2024-01-22 247 return -ENOSPC;
13e249bf4944af James Morse 2024-01-22 248
13e249bf4944af James Morse 2024-01-22 249 return cleanest_closid;
13e249bf4944af James Morse 2024-01-22 250 }
13e249bf4944af James Morse 2024-01-22 251
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-11-05 14:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202411060018.LrrsbbHA-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.