diff options
Diffstat (limited to '0010-Fix-missing-sched_idle_cpu-when-enabling-NUMA.patch')
-rw-r--r-- | 0010-Fix-missing-sched_idle_cpu-when-enabling-NUMA.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/0010-Fix-missing-sched_idle_cpu-when-enabling-NUMA.patch b/0010-Fix-missing-sched_idle_cpu-when-enabling-NUMA.patch new file mode 100644 index 000000000000..a53d4a8e57a0 --- /dev/null +++ b/0010-Fix-missing-sched_idle_cpu-when-enabling-NUMA.patch @@ -0,0 +1,37 @@ +From 64077e18194cf4b0950b4996ca8d72723b2f60c7 Mon Sep 17 00:00:00 2001 +From: hamadmarri <hamad.s.almarri@gmail.com> +Date: Mon, 25 Mar 2024 13:58:29 +0300 +Subject: [PATCH 10/16] Fix missing sched_idle_cpu when enabling NUMA + +--- + kernel/sched/balancer.h | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/kernel/sched/balancer.h b/kernel/sched/balancer.h +index e3ad04672..68965fc82 100644 +--- a/kernel/sched/balancer.h ++++ b/kernel/sched/balancer.h +@@ -310,6 +310,20 @@ static void pull_from(struct task_struct *p, struct lb_env *env) + } + + #ifdef CONFIG_NUMA_BALANCING ++/* Runqueue only has SCHED_IDLE tasks enqueued */ ++static int sched_idle_rq(struct rq *rq) ++{ ++ return unlikely(rq->nr_running == rq->cfs.idle_h_nr_running && ++ rq->nr_running); ++} ++ ++#ifdef CONFIG_SMP ++static int sched_idle_cpu(int cpu) ++{ ++ return sched_idle_rq(cpu_rq(cpu)); ++} ++#endif ++ + /* + * Returns 1, if task migration degrades locality + * Returns 0, if task migration improves locality i.e migration preferred. +-- +2.44.0 + |