From: JaeYoon Lee <lblbjy@gmail.com>
To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org
Cc: linux-kernel@vger.kernel.org, JaeYoon Lee <lblbjy@gmail.com>
Subject: [PATCH] sched/loadavg: fix comment for avenrun calculation
Date: Wed, 14 May 2025 22:10:17 +0900 [thread overview]
Message-ID: <20250514131017.77576-1-lblbjy@gmail.com> (raw)
The comment in loadavg.c incorrectly states that each avenrun[n] value is
calculated based on avenrun[0], but the code updates each avenrun[n]
independently. This patch fixes the comment to reflect the actual logic.
Signed-off-by: JaeYoon Lee <lblbjy@gmail.com>
---
kernel/sched/loadavg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/loadavg.c b/kernel/sched/loadavg.c
index c48900b856a2..060b0948c78d 100644
--- a/kernel/sched/loadavg.c
+++ b/kernel/sched/loadavg.c
@@ -22,7 +22,7 @@
* for_each_possible_cpu(cpu)
* nr_active += cpu_of(cpu)->nr_running + cpu_of(cpu)->nr_uninterruptible;
*
- * avenrun[n] = avenrun[0] * exp_n + nr_active * (1 - exp_n)
+ * avenrun[n] = avenrun[n] * exp_n + nr_active * (1 - exp_n)
*
* Due to a number of reasons the above turns in the mess below:
*
--
2.29.2
reply other threads:[~2025-05-14 13:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250514131017.77576-1-lblbjy@gmail.com \
--to=lblbjy@gmail.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®