Re: [PATCH 10/19] sched/fair: Prioritize tasks preferring destination LLC during balancing

From: Chen, Yu C

Date: Tue Oct 28 2025 - 08:11:24 EST


On 10/27/2025 2:29 PM, K Prateek Nayak wrote:
Hello Tim,

On 10/11/2025 11:54 PM, Tim Chen wrote:
+/*
+ * Do LLC balance on sched group that contains LLC, and have tasks preferring
+ * to run on LLC in idle dst_cpu.
+ */
+static inline bool llc_balance(struct lb_env *env, struct sg_lb_stats *sgs,
+ struct sched_group *group)
+{
+ struct sched_domain *child = env->sd->child;
+ int llc;
+
+ if (!sched_cache_enabled())
+ return false;
+
+ if (env->sd->flags & SD_SHARE_LLC)
+ return false;
+
+ /* only care about task migration among LLCs */
+ if (child && !(child->flags & SD_SHARE_LLC))

nit. You can just check group->flags here.


Got it, we will simplify the code.

thanks,
Chenyu