diff options
author | Rick Yiu <rickyiu@google.com> | 2024-01-24 14:04:55 +0000 |
---|---|---|
committer | Wei Wang <wvw@google.com> | 2024-02-05 06:55:19 +0000 |
commit | 5c59b92b8d8d4979b6a214e27409df3d3ebcff3b (patch) | |
tree | 0b81e4126df446759685281476896279460bef0e | |
parent | 17f889abec4cfb0a499e6cef917e4baee8401c0c (diff) | |
download | gs-5c59b92b8d8d4979b6a214e27409df3d3ebcff3b.tar.gz |
vh: sched: Refine RT placement with cpu in CPD
Currently RT placement will still select cpu in CPD if it is the only
idle cpu. Refine it to let RT place on non-idle cpus first, and it will
only select cpu in CPD unless all other cpus have RT running on them.
Bug: 280338083
Change-Id: I3bda6da7e5c6d8c45d0f3edb3966c6a25f6226f2
Signed-off-by: Rick Yiu <rickyiu@google.com>
-rw-r--r-- | drivers/soc/google/vh/kernel/sched/rt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/soc/google/vh/kernel/sched/rt.c b/drivers/soc/google/vh/kernel/sched/rt.c index ec3ab5c4c..df9a03e64 100644 --- a/drivers/soc/google/vh/kernel/sched/rt.c +++ b/drivers/soc/google/vh/kernel/sched/rt.c @@ -183,8 +183,10 @@ static int find_least_loaded_cpu(struct task_struct *p, struct cpumask *lowest_m rq_util_min, rq_util_max, cpu); // Make cpus in CPD state the least preferred - if (is_idle && !get_cluster_enabled(pixel_cpu_to_cluster[cpu])) + if (is_idle && !get_cluster_enabled(pixel_cpu_to_cluster[cpu])) { + cpu_importance[cpu] = UINT_MAX; exit_lat[cpu] = pixel_cpd_exit_latency[pixel_cpu_to_cluster[cpu]]; + } trace_sched_cpu_util_rt(cpu, capacity[cpu], capacity_of(cpu), util[cpu], exit_lat[cpu], cpu_importance[cpu], task_fits[cpu], |