public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched/fair: Use this_sd->weight to calculate span_avg
@ 2021-10-09 18:10 Tao Zhou
  2021-10-11 14:58 ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Tao Zhou @ 2021-10-09 18:10 UTC (permalink / raw)
  To: linux-kernel, Ingo Molnar, Peter Zijlstra, Juri Lelli,
	Vincent Guittot, Dietmar Eggemann, Steven Rostedt, Ben Segall,
	Mel Gorman, Daniel Bristot de Oliveira
  Cc: Tao Zhou

avg_idle, avg_cost got from this_rq and this_sd. I think
use this_sd->weight to calculate and estimate the number
of loop cpus in the target domain.
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index f6a05d9b5443..7fab7b70814c 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6300,7 +6300,7 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, bool
 		avg_idle = this_rq->wake_avg_idle;
 		avg_cost = this_sd->avg_scan_cost + 1;
 
-		span_avg = sd->span_weight * avg_idle;
+		span_avg = this_sd->span_weight * avg_idle;
 		if (span_avg > 4*avg_cost)
 			nr = div_u64(span_avg, avg_cost);
 		else
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-12 12:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-09 18:10 [PATCH] sched/fair: Use this_sd->weight to calculate span_avg Tao Zhou
2021-10-11 14:58 ` Steven Rostedt
2021-10-11 16:46   ` Tao Zhou
2021-10-12  7:11     ` Vincent Guittot
2021-10-12 12:46       ` Tao Zhou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox