From: Tao Zhou <tao.zhou@linux.dev>
To: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Daniel Bristot de Oliveira <bristot@redhat.com>
Cc: Tao Zhou <tao.zhou@linux.dev>
Subject: [PATCH] sched/pelt: Use or not add in update_irq_load_avg()
Date: Sun, 10 Oct 2021 02:06:42 +0800 [thread overview]
Message-ID: <20211009180642.20319-1-tao.zhou@linux.dev> (raw)
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
next reply other threads:[~2021-10-09 18:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-09 18:06 Tao Zhou [this message]
2021-10-09 22:45 ` [PATCH] sched/pelt: Use or not add in update_irq_load_avg() Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211009180642.20319-1-tao.zhou@linux.dev \
--to=tao.zhou@linux.dev \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox