[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202509110908.a2P8HZ8A-lkp@intel.com>
Date: Thu, 11 Sep 2025 10:03:51 +0800
From: kernel test robot <lkp@...el.com>
To: Aaron Lu <ziqianlu@...edance.com>,
Valentin Schneider <vschneid@...hat.com>,
Ben Segall <bsegall@...gle.com>,
K Prateek Nayak <kprateek.nayak@....com>,
Peter Zijlstra <peterz@...radead.org>,
Chengming Zhou <chengming.zhou@...ux.dev>,
Josh Don <joshdon@...gle.com>, Ingo Molnar <mingo@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Xi Wang <xii@...gle.com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org, Juri Lelli <juri.lelli@...hat.com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>, Mel Gorman <mgorman@...e.de>,
Chuyi Zhou <zhouchuyi@...edance.com>,
Jan Kiszka <jan.kiszka@...mens.com>,
Florian Bezdeka <florian.bezdeka@...mens.com>,
Songtang Liu <liusongtang@...edance.com>,
Chen Yu <yu.c.chen@...el.com>,
Matteo Martelli <matteo.martelli@...ethink.co.uk>,
Michal Koutný <mkoutny@...e.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: Re: [PATCH 4/4] sched/fair: Do not balance task to a throttled cfs_rq
Hi Aaron,
kernel test robot noticed the following build errors:
[auto build test ERROR on 5b726e9bf9544a349090879a513a5e00da486c14]
url: https://github.com/intel-lab-lkp/linux/commits/Aaron-Lu/sched-fair-Propagate-load-for-throttled-cfs_rq/20250910-175310
base: 5b726e9bf9544a349090879a513a5e00da486c14
patch link: https://lore.kernel.org/r/20250910095044.278-5-ziqianlu%40bytedance.com
patch subject: [PATCH 4/4] sched/fair: Do not balance task to a throttled cfs_rq
config: i386-randconfig-012-20250911 (https://download.01.org/0day-ci/archive/20250911/202509110908.a2P8HZ8A-lkp@intel.com/config)
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/20250911/202509110908.a2P8HZ8A-lkp@intel.com/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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509110908.a2P8HZ8A-lkp@intel.com/
All errors (new ones prefixed by >>):
>> kernel/sched/fair.c:9382:41: error: no member named 'cfs_rq' in 'struct task_group'
9382 | throttled_hierarchy(task_group(p)->cfs_rq[env->dst_cpu]))
| ~~~~~~~~~~~~~ ^
1 error generated.
vim +9382 kernel/sched/fair.c
9356
9357 /*
9358 * can_migrate_task - may task p from runqueue rq be migrated to this_cpu?
9359 */
9360 static
9361 int can_migrate_task(struct task_struct *p, struct lb_env *env)
9362 {
9363 long degrades, hot;
9364
9365 lockdep_assert_rq_held(env->src_rq);
9366 if (p->sched_task_hot)
9367 p->sched_task_hot = 0;
9368
9369 /*
9370 * We do not migrate tasks that are:
9371 * 1) delayed dequeued unless we migrate load, or
9372 * 2) target cfs_rq is in throttled hierarchy, or
9373 * 3) cannot be migrated to this CPU due to cpus_ptr, or
9374 * 4) running (obviously), or
9375 * 5) are cache-hot on their current CPU, or
9376 * 6) are blocked on mutexes (if SCHED_PROXY_EXEC is enabled)
9377 */
9378 if ((p->se.sched_delayed) && (env->migration_type != migrate_load))
9379 return 0;
9380
9381 if (task_group(p) &&
> 9382 throttled_hierarchy(task_group(p)->cfs_rq[env->dst_cpu]))
9383 return 0;
9384
9385 /*
9386 * We want to prioritize the migration of eligible tasks.
9387 * For ineligible tasks we soft-limit them and only allow
9388 * them to migrate when nr_balance_failed is non-zero to
9389 * avoid load-balancing trying very hard to balance the load.
9390 */
9391 if (!env->sd->nr_balance_failed &&
9392 task_is_ineligible_on_dst_cpu(p, env->dst_cpu))
9393 return 0;
9394
9395 /* Disregard percpu kthreads; they are where they need to be. */
9396 if (kthread_is_per_cpu(p))
9397 return 0;
9398
9399 if (task_is_blocked(p))
9400 return 0;
9401
9402 if (!cpumask_test_cpu(env->dst_cpu, p->cpus_ptr)) {
9403 int cpu;
9404
9405 schedstat_inc(p->stats.nr_failed_migrations_affine);
9406
9407 env->flags |= LBF_SOME_PINNED;
9408
9409 /*
9410 * Remember if this task can be migrated to any other CPU in
9411 * our sched_group. We may want to revisit it if we couldn't
9412 * meet load balance goals by pulling other tasks on src_cpu.
9413 *
9414 * Avoid computing new_dst_cpu
9415 * - for NEWLY_IDLE
9416 * - if we have already computed one in current iteration
9417 * - if it's an active balance
9418 */
9419 if (env->idle == CPU_NEWLY_IDLE ||
9420 env->flags & (LBF_DST_PINNED | LBF_ACTIVE_LB))
9421 return 0;
9422
9423 /* Prevent to re-select dst_cpu via env's CPUs: */
9424 cpu = cpumask_first_and_and(env->dst_grpmask, env->cpus, p->cpus_ptr);
9425
9426 if (cpu < nr_cpu_ids) {
9427 env->flags |= LBF_DST_PINNED;
9428 env->new_dst_cpu = cpu;
9429 }
9430
9431 return 0;
9432 }
9433
9434 /* Record that we found at least one task that could run on dst_cpu */
9435 env->flags &= ~LBF_ALL_PINNED;
9436
9437 if (task_on_cpu(env->src_rq, p) ||
9438 task_current_donor(env->src_rq, p)) {
9439 schedstat_inc(p->stats.nr_failed_migrations_running);
9440 return 0;
9441 }
9442
9443 /*
9444 * Aggressive migration if:
9445 * 1) active balance
9446 * 2) destination numa is preferred
9447 * 3) task is cache cold, or
9448 * 4) too many balance attempts have failed.
9449 */
9450 if (env->flags & LBF_ACTIVE_LB)
9451 return 1;
9452
9453 degrades = migrate_degrades_locality(p, env);
9454 if (!degrades)
9455 hot = task_hot(p, env);
9456 else
9457 hot = degrades > 0;
9458
9459 if (!hot || env->sd->nr_balance_failed > env->sd->cache_nice_tries) {
9460 if (hot)
9461 p->sched_task_hot = 1;
9462 return 1;
9463 }
9464
9465 schedstat_inc(p->stats.nr_failed_migrations_hot);
9466 return 0;
9467 }
9468
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists