]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched/cache: Fix checking active load balance by only considering the CFS task
authorChen Yu <yu.c.chen@intel.com>
Wed, 13 May 2026 20:39:22 +0000 (13:39 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 18 May 2026 19:33:17 +0000 (21:33 +0200)
commitd6b9afab44e23d537fb85ecf50330baaf9ec82e9
tree1abd9c7ce97ac8a7a6328ba6269653fe0aca6ed9
parent03755348b8e74421f92ffed9da159175a698290b
sched/cache: Fix checking active load balance by only considering the CFS task

The currently running task cur may not be a CFS task, such as
an RT or Deadline task. For non-CFS tasks, the task_util(cur)
utilization average is not maintained, so this might pass a
stale or meaningless value to can_migrate_llc().

Check if the task is CFS before getting its task_util().

This bug was reported by sashiko.

Fixes: 714059f79ff0 ("sched/cache: Handle moving single tasks to/from their preferred LLC")
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Co-developed-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/f9161133cf040d286dca11344a112c5ef2a5253d.1778703694.git.tim.c.chen@linux.intel.com
kernel/sched/fair.c