Loading kernel/sched/rt.c +5 −1 Original line number Original line Diff line number Diff line Loading @@ -1651,6 +1651,7 @@ static int find_lowest_rq_hmp(struct task_struct *task) int cpu_cost, min_cost = INT_MAX; int cpu_cost, min_cost = INT_MAX; u64 cpu_load, min_load = ULLONG_MAX; u64 cpu_load, min_load = ULLONG_MAX; int best_cpu = -1; int best_cpu = -1; int prev_cpu = task_cpu(task); int i; int i; /* Make sure the mask is initialized first */ /* Make sure the mask is initialized first */ Loading Loading @@ -1703,7 +1704,10 @@ static int find_lowest_rq_hmp(struct task_struct *task) if (sched_cpu_high_irqload(i)) if (sched_cpu_high_irqload(i)) continue; continue; if (cpu_load < min_load) { if (cpu_load < min_load || (cpu_load == min_load && (i == prev_cpu || (best_cpu != prev_cpu && cpus_share_cache(prev_cpu, i))))) { min_load = cpu_load; min_load = cpu_load; best_cpu = i; best_cpu = i; } } Loading Loading
kernel/sched/rt.c +5 −1 Original line number Original line Diff line number Diff line Loading @@ -1651,6 +1651,7 @@ static int find_lowest_rq_hmp(struct task_struct *task) int cpu_cost, min_cost = INT_MAX; int cpu_cost, min_cost = INT_MAX; u64 cpu_load, min_load = ULLONG_MAX; u64 cpu_load, min_load = ULLONG_MAX; int best_cpu = -1; int best_cpu = -1; int prev_cpu = task_cpu(task); int i; int i; /* Make sure the mask is initialized first */ /* Make sure the mask is initialized first */ Loading Loading @@ -1703,7 +1704,10 @@ static int find_lowest_rq_hmp(struct task_struct *task) if (sched_cpu_high_irqload(i)) if (sched_cpu_high_irqload(i)) continue; continue; if (cpu_load < min_load) { if (cpu_load < min_load || (cpu_load == min_load && (i == prev_cpu || (best_cpu != prev_cpu && cpus_share_cache(prev_cpu, i))))) { min_load = cpu_load; min_load = cpu_load; best_cpu = i; best_cpu = i; } } Loading