tree:
https://github.com/zen-kernel/zen-kernel 5.12/muqss
head: 5ea144678c3922d46a7030127bff3b8178e870d0
commit: 08f6a6f8ef28aef1402902c870643b4925057db0 [2/3] muqss: Tune CPU selection
config: parisc-randconfig-r016-20210711 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.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/zen-kernel/zen-kernel/commit/08f6a6f8ef28aef1402902c87...
git remote add zen-kernel-zen-kernel
https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.12/muqss
git checkout 08f6a6f8ef28aef1402902c870643b4925057db0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel/sched/MuQSS.c:209:36: error: 'CONFIG_SHARERQ' undeclared here (not in a
function); did you mean 'CONFIG_CHARLCD'?
209 | static int rqshare __read_mostly = CONFIG_SHARERQ; /* Default RQSHARE_MC */
| ^~~~~~~~~~~~~~
| CONFIG_CHARLCD
kernel/sched/MuQSS.c:263:12: warning: no previous prototype for
'arch_sd_sibling_asym_packing' [-Wmissing-prototypes]
263 | int __weak arch_sd_sibling_asym_packing(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/MuQSS.c:661:6: warning: no previous prototype for 'resched_task'
[-Wmissing-prototypes]
661 | void resched_task(struct task_struct *p)
| ^~~~~~~~~~~~
kernel/sched/MuQSS.c: In function 'best_mask_cpu':
> kernel/sched/MuQSS.c:1136:7: warning: "CONFIG_SCHED_MC"
is not defined, evaluates to 0 [-Wundef]
1136 | #elif CONFIG_SCHED_MC
| ^~~~~~~~~~~~~~~
kernel/sched/MuQSS.c:1126:13: warning: variable 'tmp_rq' set but not used
[-Wunused-but-set-variable]
1126 | struct rq *tmp_rq;
| ^~~~~~
kernel/sched/MuQSS.c: At top level:
kernel/sched/MuQSS.c:3169:15: warning: no previous prototype for 'nr_active'
[-Wmissing-prototypes]
3169 | unsigned long nr_active(void)
| ^~~~~~~~~
kernel/sched/MuQSS.c:6577:1: warning: no previous prototype for
'__do_set_cpus_allowed' [-Wmissing-prototypes]
6577 | __do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
| ^~~~~~~~~~~~~~~~~~~~~
kernel/sched/MuQSS.c:6708:6: warning: no previous prototype for 'resched_cpu'
[-Wmissing-prototypes]
6708 | void resched_cpu(int cpu)
| ^~~~~~~~~~~
kernel/sched/MuQSS.c:7043:6: warning: no previous prototype for
'sched_set_stop_task' [-Wmissing-prototypes]
7043 | void sched_set_stop_task(int cpu, struct task_struct *stop)
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/MuQSS.c: In function 'setup_rq_orders':
kernel/sched/MuQSS.c:7675:22: warning: unused variable 'i' [-Wunused-variable]
7675 | int cpu, other_cpu, i;
| ^
kernel/sched/MuQSS.c: At top level:
kernel/sched/MuQSS.c:8186:6: warning: no previous prototype for
'init_idle_bootup_task' [-Wmissing-prototypes]
8186 | void init_idle_bootup_task(struct task_struct *idle)
| ^~~~~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for HIGH_RES_TIMERS
Depends on GENERIC_CLOCKEVENTS
Selected by
- SCHED_MUQSS
vim +/CONFIG_SCHED_MC +1136 kernel/sched/MuQSS.c
1104
1105 /*
1106 * The best idle CPU is chosen according to the CPUIDLE ranking above where the
1107 * lowest value would give the most suitable CPU to schedule p onto next. The
1108 * order works out to be the following:
1109 *
1110 * Same thread, idle or busy cache, idle or busy threads
1111 * Other core, same cache, idle or busy cache, idle threads.
1112 * Same node, other CPU, idle cache, idle threads.
1113 * Same node, other CPU, busy cache, idle threads.
1114 * Other core, same cache, busy threads.
1115 * Same node, other CPU, busy threads.
1116 * Other node, other CPU, idle cache, idle threads.
1117 * Other node, other CPU, busy cache, idle threads.
1118 * Other node, other CPU, busy threads.
1119 */
1120 static int best_mask_cpu(int best_cpu, struct rq *rq, cpumask_t *tmpmask)
1121 {
1122 int best_ranking = CPUIDLE_DIFF_NODE | CPUIDLE_THREAD_BUSY |
1123 CPUIDLE_DIFF_CPU | CPUIDLE_CACHE_BUSY | CPUIDLE_DIFF_CORE |
1124 CPUIDLE_DIFF_CORE_LLC | CPUIDLE_DIFF_THREAD;
1125 int cpu_tmp, best_poss_ranking;
1126 struct rq *tmp_rq;
1127
1128 tmp_rq = cpu_rq(best_cpu);
1129 if (!(cpumask_test_cpu(best_cpu, tmpmask)
1130 #ifdef CONFIG_SCHED_SMT
1131 && tmp_rq->siblings_idle(tmp_rq)
1132 #endif
1133 )) {
1134 #ifdef CONFIG_SCHED_SMT
1135 best_poss_ranking = CPUIDLE_DIFF_THREAD;
1136 #elif CONFIG_SCHED_MC
1137 best_poss_ranking =
CPUIDLE_DIFF_CORE_LLC;
1138 #else
1139 best_poss_ranking = CPUIDLE_DIFF_CPU;
1140 #endif
1141 for_each_cpu(cpu_tmp, tmpmask) {
1142 int ranking, locality;
1143
1144 ranking = 0;
1145 tmp_rq = cpu_rq(cpu_tmp);
1146 locality = rq->cpu_locality[cpu_tmp];
1147 #ifdef CONFIG_NUMA
1148 if (locality > LOCALITY_SMP)
1149 ranking |= CPUIDLE_DIFF_NODE;
1150 else
1151 #endif
1152 if (locality > LOCALITY_MC)
1153 ranking |= CPUIDLE_DIFF_CPU;
1154 #ifdef CONFIG_SCHED_MC
1155 else if (locality == LOCALITY_MC_LLC)
1156 ranking |= CPUIDLE_DIFF_CORE_LLC;
1157 else if (locality == LOCALITY_MC)
1158 ranking |= CPUIDLE_DIFF_CORE;
1159 #endif
1160 #ifdef CONFIG_SCHED_SMT
1161 else if (locality == LOCALITY_SMT)
1162 ranking |= CPUIDLE_DIFF_THREAD;
1163 #endif
1164 #ifdef CONFIG_SCHED_MC
1165 if (ranking < best_ranking) {
1166 if (!(tmp_rq->cache_idle(tmp_rq)))
1167 ranking |= CPUIDLE_CACHE_BUSY;
1168 #endif
1169 #ifdef CONFIG_SCHED_SMT
1170 if (ranking < best_ranking) {
1171 if (!(tmp_rq->siblings_idle(tmp_rq))) {
1172 ranking |= CPUIDLE_THREAD_BUSY;
1173 if (locality == LOCALITY_SMT)
1174 best_poss_ranking = CPUIDLE_DIFF_CORE_LLC;
1175 }
1176 #endif
1177 if (ranking < best_ranking) {
1178 best_cpu = cpu_tmp;
1179 best_ranking = ranking;
1180 }
1181 #ifdef CONFIG_SCHED_SMT
1182 }
1183 #endif
1184 #ifdef CONFIG_SCHED_MC
1185 }
1186 #endif
1187 if (best_ranking <= best_poss_ranking)
1188 break;
1189 }
1190 }
1191 return best_cpu;
1192 }
1193
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org