public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched/pelt: Use or not add in update_irq_load_avg()
@ 2021-10-09 18:06 Tao Zhou
  2021-10-09 22:45 ` Peter Zijlstra
  0 siblings, 1 reply; 2+ messages in thread
From: Tao Zhou @ 2021-10-09 18:06 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

The ret value of update_irq_load_avg() can be 2. And this value
is used in __update_blocked_others(). It should be 0 or 1. Use
OR operation in update_irq_load_avg().
---
 kernel/sched/pelt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/pelt.c b/kernel/sched/pelt.c
index a554e3bbab2b..7edf21f7977c 100644
--- a/kernel/sched/pelt.c
+++ b/kernel/sched/pelt.c
@@ -458,7 +458,7 @@ int update_irq_load_avg(struct rq *rq, u64 running)
 				0,
 				0,
 				0);
-	ret += ___update_load_sum(rq->clock, &rq->avg_irq,
+	ret |= ___update_load_sum(rq->clock, &rq->avg_irq,
 				1,
 				1,
 				1);
-- 
2.32.0


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

end of thread, other threads:[~2021-10-09 22:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-09 18:06 [PATCH] sched/pelt: Use or not add in update_irq_load_avg() Tao Zhou
2021-10-09 22:45 ` Peter Zijlstra

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