All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [vincent.guittot:test/scheduler 69/74] kernel/sched/fair.c:6185 select_idle_cpu() error: uninitialized symbol 'time'.
Date: Fri, 11 Dec 2020 13:46:24 +0800	[thread overview]
Message-ID: <202012111317.9wlq96hp-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5373 bytes --]

CC: kbuild-all(a)lists.01.org
TO: Mel Gorman <mgorman@suse.de>
CC: Vincent Guittot <vincent.guittot@linaro.org>

tree:   https://git.linaro.org/people/vincent.guittot/kernel.git test/scheduler
head:   cfb162fefb7647f2c8e78681ece781233aa88eb3
commit: 490dadb841cb68eca010bad64758f679483d1c10 [69/74] sched/fair: Move avg_scan_cost calculations under SIS_PROP
:::::: branch date: 22 hours ago
:::::: commit date: 3 days ago
config: x86_64-randconfig-m001-20201209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
kernel/sched/fair.c:6185 select_idle_cpu() error: uninitialized symbol 'time'.

vim +/time +6185 kernel/sched/fair.c

10e2f1acd0106c Peter Zijlstra     2016-05-09  6138  
10e2f1acd0106c Peter Zijlstra     2016-05-09  6139  /*
10e2f1acd0106c Peter Zijlstra     2016-05-09  6140   * Scan the LLC domain for idle CPUs; this is dynamically regulated by
10e2f1acd0106c Peter Zijlstra     2016-05-09  6141   * comparing the average scan cost (tracked in sd->avg_scan_cost) against the
10e2f1acd0106c Peter Zijlstra     2016-05-09  6142   * average idle time for this rq (as found in rq->avg_idle).
10e2f1acd0106c Peter Zijlstra     2016-05-09  6143   */
10e2f1acd0106c Peter Zijlstra     2016-05-09  6144  static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int target)
10e2f1acd0106c Peter Zijlstra     2016-05-09  6145  {
60588bfa223ff6 Cheng Jian         2019-12-13  6146  	struct cpumask *cpus = this_cpu_cpumask_var_ptr(select_idle_mask);
9cfb38a7ba5a9c Wanpeng Li         2016-10-09  6147  	struct sched_domain *this_sd;
d76343c6b2b79f Valentin Schneider 2020-03-30  6148  	u64 time;
8dc2d993cf1aea Peter Zijlstra     2019-02-27  6149  	int this = smp_processor_id();
17346452b25b98 Viresh Kumar       2019-11-14  6150  	int cpu, nr = INT_MAX;
10e2f1acd0106c Peter Zijlstra     2016-05-09  6151  
9cfb38a7ba5a9c Wanpeng Li         2016-10-09  6152  	this_sd = rcu_dereference(*this_cpu_ptr(&sd_llc));
9cfb38a7ba5a9c Wanpeng Li         2016-10-09  6153  	if (!this_sd)
9cfb38a7ba5a9c Wanpeng Li         2016-10-09  6154  		return -1;
9cfb38a7ba5a9c Wanpeng Li         2016-10-09  6155  
490dadb841cb68 Mel Gorman         2020-12-08  6156  	cpumask_and(cpus, sched_domain_span(sd), p->cpus_ptr);
490dadb841cb68 Mel Gorman         2020-12-08  6157  
321178b2549dd6 Mel Gorman         2020-12-08  6158  	if (sched_feat(SIS_PROP)) {
321178b2549dd6 Mel Gorman         2020-12-08  6159  		u64 avg_cost, avg_idle, span_avg;
321178b2549dd6 Mel Gorman         2020-12-08  6160  
10e2f1acd0106c Peter Zijlstra     2016-05-09  6161  		/*
321178b2549dd6 Mel Gorman         2020-12-08  6162  		 * Due to large variance we need a large fuzz factor;
321178b2549dd6 Mel Gorman         2020-12-08  6163  		 * hackbench in particularly is sensitive here.
10e2f1acd0106c Peter Zijlstra     2016-05-09  6164  		 */
1ad3aaf3fcd244 Peter Zijlstra     2017-05-17  6165  		avg_idle = this_rq()->avg_idle / 512;
1ad3aaf3fcd244 Peter Zijlstra     2017-05-17  6166  		avg_cost = this_sd->avg_scan_cost + 1;
1ad3aaf3fcd244 Peter Zijlstra     2017-05-17  6167  
321178b2549dd6 Mel Gorman         2020-12-08  6168  		span_avg = sd->span_weight * avg_idle;
1ad3aaf3fcd244 Peter Zijlstra     2017-05-17  6169  		if (span_avg > 4*avg_cost)
1ad3aaf3fcd244 Peter Zijlstra     2017-05-17  6170  			nr = div_u64(span_avg, avg_cost);
1ad3aaf3fcd244 Peter Zijlstra     2017-05-17  6171  		else
1ad3aaf3fcd244 Peter Zijlstra     2017-05-17  6172  			nr = 4;
1ad3aaf3fcd244 Peter Zijlstra     2017-05-17  6173  
8dc2d993cf1aea Peter Zijlstra     2019-02-27  6174  		time = cpu_clock(this);
490dadb841cb68 Mel Gorman         2020-12-08  6175  	}
60588bfa223ff6 Cheng Jian         2019-12-13  6176  
60588bfa223ff6 Cheng Jian         2019-12-13  6177  	for_each_cpu_wrap(cpu, cpus, target) {
1ad3aaf3fcd244 Peter Zijlstra     2017-05-17  6178  		if (!--nr)
17346452b25b98 Viresh Kumar       2019-11-14  6179  			return -1;
17346452b25b98 Viresh Kumar       2019-11-14  6180  		if (available_idle_cpu(cpu) || sched_idle_cpu(cpu))
10e2f1acd0106c Peter Zijlstra     2016-05-09  6181  			break;
10e2f1acd0106c Peter Zijlstra     2016-05-09  6182  	}
10e2f1acd0106c Peter Zijlstra     2016-05-09  6183  
490dadb841cb68 Mel Gorman         2020-12-08  6184  	if (sched_feat(SIS_PROP)) {
8dc2d993cf1aea Peter Zijlstra     2019-02-27 @6185  		time = cpu_clock(this) - time;
d76343c6b2b79f Valentin Schneider 2020-03-30  6186  		update_avg(&this_sd->avg_scan_cost, time);
490dadb841cb68 Mel Gorman         2020-12-08  6187  	}
10e2f1acd0106c Peter Zijlstra     2016-05-09  6188  
10e2f1acd0106c Peter Zijlstra     2016-05-09  6189  	return cpu;
10e2f1acd0106c Peter Zijlstra     2016-05-09  6190  }
10e2f1acd0106c Peter Zijlstra     2016-05-09  6191  

:::::: The code at line 6185 was first introduced by commit
:::::: 8dc2d993cf1aea578d947e34ea2d5c6ffd1644e4 x86/percpu, sched/fair: Avoid local_clock()

:::::: TO: Peter Zijlstra <peterz@infradead.org>
:::::: CC: Ingo Molnar <mingo@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35380 bytes --]

                 reply	other threads:[~2020-12-11  5:46 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=202012111317.9wlq96hp-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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.