tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 5930fa3740c518a9f6ba688fd0c1873d6f3adbce commit: 6eb07f9925a906d81f328c808ba25f7800888dce [3536/3536] sched: Introduce smart grid scheduling strategy for cfs config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20251212/202512120744.b8phlWWR-lkp@i...) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251212/202512120744.b8phlWWR-lkp@i...) 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@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512120744.b8phlWWR-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from kernel/sched/core.c:9: In file included from include/linux/highmem.h:8: In file included from include/linux/cacheflush.h:5: In file included from arch/x86/include/asm/cacheflush.h:5: In file included from include/linux/mm.h:2181: include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 509 | item]; | ~~~~ include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 516 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 528 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 537 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/core.c:11374:5: warning: no previous prototype for function 'tg_set_dynamic_affinity_mode' [-Wmissing-prototypes] 11374 | int tg_set_dynamic_affinity_mode(struct task_group *tg, u64 mode) | ^ kernel/sched/core.c:11374:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 11374 | int tg_set_dynamic_affinity_mode(struct task_group *tg, u64 mode) | ^ | static kernel/sched/core.c:11415:5: warning: no previous prototype for function 'tg_set_affinity_period' [-Wmissing-prototypes] 11415 | int tg_set_affinity_period(struct task_group *tg, u64 period_ms) | ^ kernel/sched/core.c:11415:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 11415 | int tg_set_affinity_period(struct task_group *tg, u64 period_ms) | ^ | static kernel/sched/core.c:11429:5: warning: no previous prototype for function 'tg_get_affinity_period' [-Wmissing-prototypes] 11429 | u64 tg_get_affinity_period(struct task_group *tg) | ^ kernel/sched/core.c:11429:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 11429 | u64 tg_get_affinity_period(struct task_group *tg) | ^ | static 8 warnings generated.
vim +/tg_set_dynamic_affinity_mode +11374 kernel/sched/core.c 11372 11373 #ifdef CONFIG_QOS_SCHED_SMART_GRID 11374 int tg_set_dynamic_affinity_mode(struct task_group *tg, u64 mode) 11375 { 11376 struct auto_affinity *auto_affi = tg->auto_affinity; 11377 11378 if (unlikely(!auto_affi)) 11379 return -EPERM; 11380 11381 /* auto mode */ 11382 if (mode == 1) 11383 start_auto_affinity(auto_affi); 11384 else if (mode == 0) 11385 stop_auto_affinity(auto_affi); 11386 else 11387 return -EINVAL; 11388 11389 return 0; 11390 } 11391 11392 static u64 cpu_affinity_mode_read_u64(struct cgroup_subsys_state *css, 11393 struct cftype *cft) 11394 { 11395 struct task_group *tg = css_tg(css); 11396 11397 if (!dynamic_affinity_enabled()) 11398 return -EPERM; 11399 11400 if (unlikely(!tg->auto_affinity)) 11401 return -EPERM; 11402 11403 return tg->auto_affinity->mode; 11404 } 11405 11406 static int cpu_affinity_mode_write_u64(struct cgroup_subsys_state *css, 11407 struct cftype *cftype, u64 mode) 11408 { 11409 if (!dynamic_affinity_enabled()) 11410 return -EPERM; 11411 11412 return tg_set_dynamic_affinity_mode(css_tg(css), mode); 11413 } 11414 11415 int tg_set_affinity_period(struct task_group *tg, u64 period_ms) 11416 { 11417 if (unlikely(!tg->auto_affinity)) 11418 return -EPERM; 11419 11420 if (!period_ms || period_ms > U64_MAX / NSEC_PER_MSEC) 11421 return -EINVAL; 11422 11423 raw_spin_lock_irq(&tg->auto_affinity->lock); 11424 tg->auto_affinity->period = ms_to_ktime(period_ms); 11425 raw_spin_unlock_irq(&tg->auto_affinity->lock); 11426 return 0; 11427 } 11428 11429 u64 tg_get_affinity_period(struct task_group *tg) 11430 { 11431 if (unlikely(!tg->auto_affinity)) 11432 return -EPERM; 11433 11434 return ktime_to_ms(tg->auto_affinity->period); 11435 } 11436 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki