Hi Andrea, kernel test robot noticed the following build errors: [auto build test ERROR on next-20250212] [cannot apply to tip/sched/core akpm-mm/mm-everything tip/master linus/master tip/auto-latest v6.14-rc2 v6.14-rc1 v6.13 v6.14-rc2] [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#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Andrea-Righi/mm-numa-Introduce-nearest_node_nodemask/20250213-014857 base: next-20250212 patch link: https://lore.kernel.org/r/20250212165006.490130-7-arighi%40nvidia.com patch subject: [PATCH 6/7] sched_ext: idle: Per-node idle cpumasks config: i386-buildonly-randconfig-005-20250213 (https://download.01.org/0day-ci/archive/20250213/202502131834.ni8ojoRO-lkp@xxxxxxxxx/config) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250213/202502131834.ni8ojoRO-lkp@xxxxxxxxx/reproduce) 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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202502131834.ni8ojoRO-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): In file included from kernel/sched/build_policy.c:63: kernel/sched/ext.c:6014:31: warning: bitwise operation between different enumeration types ('enum scx_enq_flags' and 'enum scx_deq_flags') [-Wenum-enum-conversion] 6014 | WRITE_ONCE(v, SCX_ENQ_WAKEUP | SCX_DEQ_SLEEP | SCX_KICK_PREEMPT | | ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~ include/asm-generic/rwonce.h:61:18: note: expanded from macro 'WRITE_ONCE' 61 | __WRITE_ONCE(x, val); \ | ^~~ include/asm-generic/rwonce.h:55:33: note: expanded from macro '__WRITE_ONCE' 55 | *(volatile typeof(x) *)&(x) = (val); \ | ^~~ In file included from kernel/sched/build_policy.c:64: >> kernel/sched/ext_idle.c:136:9: error: '__section__' attribute only applies to functions, global variables, Objective-C methods, and Objective-C properties 136 | static DEFINE_PER_CPU(nodemask_t, per_cpu_unvisited); | ^ include/linux/percpu-defs.h:115:2: note: expanded from macro 'DEFINE_PER_CPU' 115 | DEFINE_PER_CPU_SECTION(type, name, "") | ^ include/linux/percpu-defs.h:93:2: note: expanded from macro 'DEFINE_PER_CPU_SECTION' 93 | __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ | ^ include/linux/percpu-defs.h:54:2: note: expanded from macro '__PCPU_DUMMY_ATTRS' 54 | __section(".discard") __attribute__((unused)) | ^ include/linux/compiler_attributes.h:321:56: note: expanded from macro '__section' 321 | #define __section(section) __attribute__((__section__(section))) | ^ In file included from kernel/sched/build_policy.c:64: >> kernel/sched/ext_idle.c:136:9: error: non-extern declaration of '__pcpu_unique_per_cpu_unvisited' follows extern declaration include/linux/percpu-defs.h:115:2: note: expanded from macro 'DEFINE_PER_CPU' 115 | DEFINE_PER_CPU_SECTION(type, name, "") | ^ include/linux/percpu-defs.h:93:26: note: expanded from macro 'DEFINE_PER_CPU_SECTION' 93 | __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ | ^ <scratch space>:82:1: note: expanded from here 82 | __pcpu_unique_per_cpu_unvisited | ^ kernel/sched/ext_idle.c:136:9: note: previous declaration is here include/linux/percpu-defs.h:115:2: note: expanded from macro 'DEFINE_PER_CPU' 115 | DEFINE_PER_CPU_SECTION(type, name, "") | ^ include/linux/percpu-defs.h:92:33: note: expanded from macro 'DEFINE_PER_CPU_SECTION' 92 | extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ | ^ <scratch space>:81:1: note: expanded from here 81 | __pcpu_unique_per_cpu_unvisited | ^ In file included from kernel/sched/build_policy.c:64: >> kernel/sched/ext_idle.c:136:9: error: 'section' attribute only applies to functions, global variables, Objective-C methods, and Objective-C properties 136 | static DEFINE_PER_CPU(nodemask_t, per_cpu_unvisited); | ^ include/linux/percpu-defs.h:115:2: note: expanded from macro 'DEFINE_PER_CPU' 115 | DEFINE_PER_CPU_SECTION(type, name, "") | ^ include/linux/percpu-defs.h:95:2: note: expanded from macro 'DEFINE_PER_CPU_SECTION' 95 | __PCPU_ATTRS(sec) __weak __typeof__(type) name | ^ include/linux/percpu-defs.h:50:26: note: expanded from macro '__PCPU_ATTRS' 50 | __percpu __attribute__((section(PER_CPU_BASE_SECTION sec))) \ | ^ In file included from kernel/sched/build_policy.c:64: >> kernel/sched/ext_idle.c:136:36: error: non-extern declaration of 'per_cpu_unvisited' follows extern declaration 136 | static DEFINE_PER_CPU(nodemask_t, per_cpu_unvisited); | ^ kernel/sched/ext_idle.c:136:36: note: previous declaration is here >> kernel/sched/ext_idle.c:136:9: error: weak declaration cannot have internal linkage 136 | static DEFINE_PER_CPU(nodemask_t, per_cpu_unvisited); | ^ include/linux/percpu-defs.h:115:2: note: expanded from macro 'DEFINE_PER_CPU' 115 | DEFINE_PER_CPU_SECTION(type, name, "") | ^ include/linux/percpu-defs.h:95:20: note: expanded from macro 'DEFINE_PER_CPU_SECTION' 95 | __PCPU_ATTRS(sec) __weak __typeof__(type) name | ^ include/linux/compiler_attributes.h:403:56: note: expanded from macro '__weak' 403 | #define __weak __attribute__((__weak__)) | ^ 1 warning and 5 errors generated. vim +/__section__ +136 kernel/sched/ext_idle.c 133 134 static s32 pick_idle_cpu_from_other_nodes(const struct cpumask *cpus_allowed, int node, u64 flags) 135 { > 136 static DEFINE_PER_CPU(nodemask_t, per_cpu_unvisited); 137 nodemask_t *unvisited = this_cpu_ptr(&per_cpu_unvisited); 138 s32 cpu = -EBUSY; 139 140 preempt_disable(); 141 unvisited = this_cpu_ptr(&per_cpu_unvisited); 142 143 /* 144 * Restrict the search to the online nodes, excluding the current 145 * one. 146 */ 147 nodes_clear(*unvisited); 148 nodes_or(*unvisited, *unvisited, node_states[N_ONLINE]); 149 node_clear(node, *unvisited); 150 151 /* 152 * Traverse all nodes in order of increasing distance, starting 153 * from @node. 154 * 155 * This loop is O(N^2), with N being the amount of NUMA nodes, 156 * which might be quite expensive in large NUMA systems. However, 157 * this complexity comes into play only when a scheduler enables 158 * SCX_OPS_BUILTIN_IDLE_PER_NODE and it's requesting an idle CPU 159 * without specifying a target NUMA node, so it shouldn't be a 160 * bottleneck is most cases. 161 * 162 * As a future optimization we may want to cache the list of nodes 163 * in a per-node array, instead of actually traversing them every 164 * time. 165 */ 166 for_each_node_numadist(node, *unvisited) { 167 cpu = pick_idle_cpu_in_node(cpus_allowed, node, flags); 168 if (cpu >= 0) 169 break; 170 } 171 preempt_enable(); 172 173 return cpu; 174 } 175 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki