lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202104092148.S2F5uRsk-lkp@intel.com>
Date:   Fri, 9 Apr 2021 21:56:55 +0800
From:   kernel test robot <lkp@...el.com>
To:     Rik van Riel <riel@...riel.com>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        linux-kernel@...r.kernel.org, x86@...nel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Mel Gorman <mgorman@...e.de>
Subject: [tip:sched/core 2/5] kernel/sched/fair.c:6345:28: error: use of
 undeclared identifier 'sched_smt_present'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core
head:   816969e4af7a56bfd284d2e0fa11511900ab93e3
commit: 6bcd3e21ba278098920d26d4888f5e6f4087c61d [2/5] sched/fair: Bring back select_idle_smt(), but differently
config: powerpc64-randconfig-r033-20210409 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dd453a1389b6a7e6d9214b449d3c54981b1a89b6)
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
        # install powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=6bcd3e21ba278098920d26d4888f5e6f4087c61d
        git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
        git fetch --no-tags tip sched/core
        git checkout 6bcd3e21ba278098920d26d4888f5e6f4087c61d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

>> kernel/sched/fair.c:6345:28: error: use of undeclared identifier 'sched_smt_present'
           if (static_branch_likely(&sched_smt_present)) {
                                     ^
>> kernel/sched/fair.c:6345:28: error: use of undeclared identifier 'sched_smt_present'
>> kernel/sched/fair.c:6345:28: error: use of undeclared identifier 'sched_smt_present'
>> kernel/sched/fair.c:6345:28: error: use of undeclared identifier 'sched_smt_present'
   4 errors generated.


vim +/sched_smt_present +6345 kernel/sched/fair.c

  6259	
  6260	/*
  6261	 * Try and locate an idle core/thread in the LLC cache domain.
  6262	 */
  6263	static int select_idle_sibling(struct task_struct *p, int prev, int target)
  6264	{
  6265		bool has_idle_core = false;
  6266		struct sched_domain *sd;
  6267		unsigned long task_util;
  6268		int i, recent_used_cpu;
  6269	
  6270		/*
  6271		 * On asymmetric system, update task utilization because we will check
  6272		 * that the task fits with cpu's capacity.
  6273		 */
  6274		if (static_branch_unlikely(&sched_asym_cpucapacity)) {
  6275			sync_entity_load_avg(&p->se);
  6276			task_util = uclamp_task_util(p);
  6277		}
  6278	
  6279		if ((available_idle_cpu(target) || sched_idle_cpu(target)) &&
  6280		    asym_fits_capacity(task_util, target))
  6281			return target;
  6282	
  6283		/*
  6284		 * If the previous CPU is cache affine and idle, don't be stupid:
  6285		 */
  6286		if (prev != target && cpus_share_cache(prev, target) &&
  6287		    (available_idle_cpu(prev) || sched_idle_cpu(prev)) &&
  6288		    asym_fits_capacity(task_util, prev))
  6289			return prev;
  6290	
  6291		/*
  6292		 * Allow a per-cpu kthread to stack with the wakee if the
  6293		 * kworker thread and the tasks previous CPUs are the same.
  6294		 * The assumption is that the wakee queued work for the
  6295		 * per-cpu kthread that is now complete and the wakeup is
  6296		 * essentially a sync wakeup. An obvious example of this
  6297		 * pattern is IO completions.
  6298		 */
  6299		if (is_per_cpu_kthread(current) &&
  6300		    prev == smp_processor_id() &&
  6301		    this_rq()->nr_running <= 1) {
  6302			return prev;
  6303		}
  6304	
  6305		/* Check a recently used CPU as a potential idle candidate: */
  6306		recent_used_cpu = p->recent_used_cpu;
  6307		if (recent_used_cpu != prev &&
  6308		    recent_used_cpu != target &&
  6309		    cpus_share_cache(recent_used_cpu, target) &&
  6310		    (available_idle_cpu(recent_used_cpu) || sched_idle_cpu(recent_used_cpu)) &&
  6311		    cpumask_test_cpu(p->recent_used_cpu, p->cpus_ptr) &&
  6312		    asym_fits_capacity(task_util, recent_used_cpu)) {
  6313			/*
  6314			 * Replace recent_used_cpu with prev as it is a potential
  6315			 * candidate for the next wake:
  6316			 */
  6317			p->recent_used_cpu = prev;
  6318			return recent_used_cpu;
  6319		}
  6320	
  6321		/*
  6322		 * For asymmetric CPU capacity systems, our domain of interest is
  6323		 * sd_asym_cpucapacity rather than sd_llc.
  6324		 */
  6325		if (static_branch_unlikely(&sched_asym_cpucapacity)) {
  6326			sd = rcu_dereference(per_cpu(sd_asym_cpucapacity, target));
  6327			/*
  6328			 * On an asymmetric CPU capacity system where an exclusive
  6329			 * cpuset defines a symmetric island (i.e. one unique
  6330			 * capacity_orig value through the cpuset), the key will be set
  6331			 * but the CPUs within that cpuset will not have a domain with
  6332			 * SD_ASYM_CPUCAPACITY. These should follow the usual symmetric
  6333			 * capacity path.
  6334			 */
  6335			if (sd) {
  6336				i = select_idle_capacity(p, sd, target);
  6337				return ((unsigned)i < nr_cpumask_bits) ? i : target;
  6338			}
  6339		}
  6340	
  6341		sd = rcu_dereference(per_cpu(sd_llc, target));
  6342		if (!sd)
  6343			return target;
  6344	
> 6345		if (static_branch_likely(&sched_smt_present)) {
  6346			has_idle_core = test_idle_cores(target, false);
  6347	
  6348			if (!has_idle_core && cpus_share_cache(prev, target)) {
  6349				i = select_idle_smt(p, sd, prev);
  6350				if ((unsigned int)i < nr_cpumask_bits)
  6351					return i;
  6352			}
  6353		}
  6354	
  6355		i = select_idle_cpu(p, sd, has_idle_core, target);
  6356		if ((unsigned)i < nr_cpumask_bits)
  6357			return i;
  6358	
  6359		return target;
  6360	}
  6361	

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

Download attachment ".config.gz" of type "application/gzip" (26615 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ