Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Aaron Lu <ziqianlu@bytedance.com>,
	Valentin Schneider <vschneid@redhat.com>,
	Ben Segall <bsegall@google.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Chengming Zhou <chengming.zhou@linux.dev>,
	Josh Don <joshdon@google.com>, Ingo Molnar <mingo@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Xi Wang <xii@google.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	"Juri Lelli" <juri.lelli@redhat.com>,
	"Dietmar Eggemann" <dietmar.eggemann@arm.com>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Mel Gorman" <mgorman@suse.de>,
	"Chuyi Zhou" <zhouchuyi@bytedance.com>,
	"Jan Kiszka" <jan.kiszka@siemens.com>,
	"Florian Bezdeka" <florian.bezdeka@siemens.com>,
	"Songtang Liu" <liusongtang@bytedance.com>,
	"Chen Yu" <yu.c.chen@intel.com>,
	"Matteo Martelli" <matteo.martelli@codethink.co.uk>,
	"Michal Koutný" <mkoutny@suse.com>,
	"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>
Subject: Re: [PATCH 4/4] sched/fair: Do not balance task to a throttled cfs_rq
Date: Thu, 11 Sep 2025 10:03:51 +0800	[thread overview]
Message-ID: <202509110908.a2P8HZ8A-lkp@intel.com> (raw)
In-Reply-To: <20250910095044.278-5-ziqianlu@bytedance.com>

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@intel.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

       reply	other threads:[~2025-09-11  2:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250910095044.278-5-ziqianlu@bytedance.com>
2025-09-11  2:03 ` kernel test robot [this message]
2025-09-12  3:44   ` [PATCH update 4/4] sched/fair: Do not balance task to a throttled cfs_rq Aaron Lu
2025-09-12  3:56     ` K Prateek Nayak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202509110908.a2P8HZ8A-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bigeasy@linutronix.de \
    --cc=bsegall@google.com \
    --cc=chengming.zhou@linux.dev \
    --cc=dietmar.eggemann@arm.com \
    --cc=florian.bezdeka@siemens.com \
    --cc=jan.kiszka@siemens.com \
    --cc=joshdon@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liusongtang@bytedance.com \
    --cc=llvm@lists.linux.dev \
    --cc=matteo.martelli@codethink.co.uk \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=mkoutny@suse.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=xii@google.com \
    --cc=yu.c.chen@intel.com \
    --cc=zhouchuyi@bytedance.com \
    --cc=ziqianlu@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox