Hi Cruz,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tip/sched/core]
[also build test ERROR on tip/master linux/master linus/master next-20220112]
[cannot apply to tj-cgroup/for-next v5.16]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Cruz-Zhao/Accounting-forced-idle...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
82762d2af31a60081162890983a83499c9c7dd74
config: ia64-randconfig-r024-20220112
(
https://download.01.org/0day-ci/archive/20220113/202201130529.HUZtnC5G-lk...)
compiler: ia64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://github.com/0day-ci/linux/commit/363ef949b487441383f2719bdff3dc915...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Cruz-Zhao/Accounting-forced-idle-time-per-cpu-and-per-cgroup/20220111-175754
git checkout 363ef949b487441383f2719bdff3dc9156779565
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir
ARCH=ia64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
kernel/sched/core_sched.c: In function '__sched_core_account_forceidle':
> kernel/sched/core_sched.c:287:17: error: implicit declaration of
function 'cpuacct_account_forceidle'; did you mean
'sched_core_account_forceidle'? [-Werror=implicit-function-declaration]
287 | cpuacct_account_forceidle(i, p, delta);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| sched_core_account_forceidle
cc1: some warnings being treated as errors
vim +287 kernel/sched/core_sched.c
240
241 /* REQUIRES: rq->core's clock recently updated. */
242 void __sched_core_account_forceidle(struct rq *rq)
243 {
244 const struct cpumask *smt_mask = cpu_smt_mask(cpu_of(rq));
245 u64 delta_per_idlecpu, delta, now = rq_clock(rq->core);
246 struct rq *rq_i;
247 struct task_struct *p;
248 int i;
249
250 lockdep_assert_rq_held(rq);
251
252 WARN_ON_ONCE(!rq->core->core_forceidle_count);
253
254 if (rq->core->core_forceidle_start == 0)
255 return;
256
257 delta_per_idlecpu = delta = now - rq->core->core_forceidle_start;
258 if (unlikely((s64)delta <= 0))
259 return;
260
261 rq->core->core_forceidle_start = now;
262
263 if (WARN_ON_ONCE(!rq->core->core_forceidle_occupation)) {
264 /* can't be forced idle without a running task */
265 } else if (rq->core->core_forceidle_count > 1 ||
266 rq->core->core_forceidle_occupation > 1) {
267 /*
268 * For larger SMT configurations, we need to scale the charged
269 * forced idle amount since there can be more than one forced
270 * idle sibling and more than one running cookied task.
271 */
272 delta *= rq->core->core_forceidle_count;
273 delta = div_u64(delta, rq->core->core_forceidle_occupation);
274 }
275
276 for_each_cpu(i, smt_mask) {
277 rq_i = cpu_rq(i);
278 p = rq_i->core_pick ?: rq_i->curr;
279
280 if (rq_i->in_forcedidle)
281 rq->rq_forceidle_time += delta_per_idlecpu;
282
283 if (p == rq_i->idle)
284 continue;
285
286 __schedstat_add(p->stats.core_forceidle_sum, delta);
287 cpuacct_account_forceidle(i, p, delta);
288 }
289 }
290
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org