mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
sched/walt: Use nr_running > 1 condition for same cluster lb
FIFO/RT tasks are supposed to run for short amount of time. So when a CPU is busy with 1 RT and 1 CFS task, the other idle CPU won't offer help thinking the CFS task will run immediately. However, results indicate that realaxing this policy and pulling the CFS task helps in reducing the runnables. This policy is limited to the same capacity cluster load balance as we want strict prefer idle behavior for it. Change-Id: I4df6e00233503e096b1bb87fd17a784ea53fd9be Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
parent
0505931c2b
commit
0f4dd4ed4f
|
|
@ -323,7 +323,6 @@ static int walt_lb_find_busiest_similar_cap_cpu(int dst_cpu, const cpumask_t *sr
|
|||
{
|
||||
int i;
|
||||
int busiest_cpu = -1;
|
||||
int busiest_nr = 1; /* we need atleast 2 */
|
||||
unsigned long util, busiest_util = 0;
|
||||
struct walt_rq *wrq;
|
||||
|
||||
|
|
@ -331,14 +330,13 @@ static int walt_lb_find_busiest_similar_cap_cpu(int dst_cpu, const cpumask_t *sr
|
|||
wrq = (struct walt_rq *) cpu_rq(i)->android_vendor_data1;
|
||||
trace_walt_lb_cpu_util(i, wrq);
|
||||
|
||||
if (cpu_rq(i)->cfs.h_nr_running < 2)
|
||||
if (cpu_rq(i)->nr_running < 2 || !cpu_rq(i)->cfs.h_nr_running)
|
||||
continue;
|
||||
|
||||
util = walt_lb_cpu_util(i);
|
||||
if (util < busiest_util)
|
||||
continue;
|
||||
|
||||
busiest_nr = cpu_rq(i)->cfs.h_nr_running;
|
||||
busiest_util = util;
|
||||
busiest_cpu = i;
|
||||
}
|
||||
|
|
@ -351,7 +349,6 @@ static int walt_lb_find_busiest_higher_cap_cpu(int dst_cpu, const cpumask_t *src
|
|||
{
|
||||
int i;
|
||||
int busiest_cpu = -1;
|
||||
int busiest_nr = 1; /* we need atleast 2 */
|
||||
unsigned long util, busiest_util = 0;
|
||||
unsigned long total_capacity = 0, total_util = 0, total_nr = 0;
|
||||
int total_cpus = 0;
|
||||
|
|
@ -390,7 +387,6 @@ static int walt_lb_find_busiest_higher_cap_cpu(int dst_cpu, const cpumask_t *src
|
|||
if (util < busiest_util)
|
||||
continue;
|
||||
|
||||
busiest_nr = cpu_rq(i)->cfs.h_nr_running;
|
||||
busiest_util = util;
|
||||
busiest_cpu = i;
|
||||
}
|
||||
|
|
@ -411,7 +407,6 @@ static int walt_lb_find_busiest_lower_cap_cpu(int dst_cpu, const cpumask_t *src_
|
|||
{
|
||||
int i;
|
||||
int busiest_cpu = -1;
|
||||
int busiest_nr = 1; /* we need atleast 2 */
|
||||
unsigned long util, busiest_util = 0;
|
||||
unsigned long total_capacity = 0, total_util = 0, total_nr = 0;
|
||||
int total_cpus = 0;
|
||||
|
|
@ -457,7 +452,6 @@ static int walt_lb_find_busiest_lower_cap_cpu(int dst_cpu, const cpumask_t *src_
|
|||
if (util < busiest_util)
|
||||
continue;
|
||||
|
||||
busiest_nr = cpu_rq(i)->cfs.h_nr_running;
|
||||
busiest_util = util;
|
||||
busiest_cpu = i;
|
||||
busy_nr_big_tasks = wrq->walt_stats.nr_big_tasks;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user