Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH] cpufreq: schedutil: Fix self-contradictory comment in sugov_iowait_apply()
@ 2026-07-03  9:24 Zhongqiu Han
  2026-07-03 10:17 ` Christian Loehle
  0 siblings, 1 reply; 2+ messages in thread
From: Zhongqiu Han @ 2026-07-03  9:24 UTC (permalink / raw)
  To: rafael, viresh.kumar, mingo, peterz, juri.lelli, vincent.guittot,
	dietmar.eggemann, rostedt, bsegall, mgorman, vschneid,
	kprateek.nayak, christian.loehle
  Cc: joel, patrick.bellasi, linux-pm, linux-kernel, zhongqiu.han

The kerneldoc of sugov_iowait_apply() says the IO boost value is increased
in sugov_iowait_apply() and, in the same sentence, that it is decreased by
the same function. That is self-contradictory, and the first part is wrong:
sugov_iowait_apply() only decreases the boost.

The boost is actually increased in sugov_iowait_boost(). Fix the comment to
name sugov_iowait_boost() as the place where the boost is increased, so it
matches the code.

No functional change.

Fixes: fd7d5287fd65 ("cpufreq: schedutil: Cleanup and document iowait boost")
Signed-off-by: Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>
---
 kernel/sched/cpufreq_schedutil.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index a4e689eefdfb..f7aa26d62700 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -314,7 +314,7 @@ static void sugov_iowait_boost(struct sugov_cpu *sg_cpu, u64 time,
  * A CPU running a task which woken up after an IO operation can have its
  * utilization boosted to speed up the completion of those IO operations.
  * The IO boost value is increased each time a task wakes up from IO, in
- * sugov_iowait_apply(), and it's instead decreased by this function,
+ * sugov_iowait_boost(), and it's instead decreased by this function,
  * each time an increase has not been requested (!iowait_boost_pending).
  *
  * A CPU which also appears to have been idle for at least one tick has also
-- 
2.43.0


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

* Re: [PATCH] cpufreq: schedutil: Fix self-contradictory comment in sugov_iowait_apply()
  2026-07-03  9:24 [PATCH] cpufreq: schedutil: Fix self-contradictory comment in sugov_iowait_apply() Zhongqiu Han
@ 2026-07-03 10:17 ` Christian Loehle
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Loehle @ 2026-07-03 10:17 UTC (permalink / raw)
  To: Zhongqiu Han, rafael, viresh.kumar, mingo, peterz, juri.lelli,
	vincent.guittot, dietmar.eggemann, rostedt, bsegall, mgorman,
	vschneid, kprateek.nayak
  Cc: joel, patrick.bellasi, linux-pm, linux-kernel

On 7/3/26 10:24, Zhongqiu Han wrote:
> The kerneldoc of sugov_iowait_apply() says the IO boost value is increased
> in sugov_iowait_apply() and, in the same sentence, that it is decreased by
> the same function. That is self-contradictory, and the first part is wrong:
> sugov_iowait_apply() only decreases the boost.
> 
> The boost is actually increased in sugov_iowait_boost(). Fix the comment to
> name sugov_iowait_boost() as the place where the boost is increased, so it
> matches the code.
> 
> No functional change.
> 
> Fixes: fd7d5287fd65 ("cpufreq: schedutil: Cleanup and document iowait boost")
> Signed-off-by: Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>

Reviewed-by: Christian Loehle <christian.loehle@arm.com>

> ---
>  kernel/sched/cpufreq_schedutil.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
> index a4e689eefdfb..f7aa26d62700 100644
> --- a/kernel/sched/cpufreq_schedutil.c
> +++ b/kernel/sched/cpufreq_schedutil.c
> @@ -314,7 +314,7 @@ static void sugov_iowait_boost(struct sugov_cpu *sg_cpu, u64 time,
>   * A CPU running a task which woken up after an IO operation can have its
>   * utilization boosted to speed up the completion of those IO operations.
>   * The IO boost value is increased each time a task wakes up from IO, in
> - * sugov_iowait_apply(), and it's instead decreased by this function,
> + * sugov_iowait_boost(), and it's instead decreased by this function,
>   * each time an increase has not been requested (!iowait_boost_pending).
>   *
>   * A CPU which also appears to have been idle for at least one tick has also



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

end of thread, other threads:[~2026-07-03 10:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-03  9:24 [PATCH] cpufreq: schedutil: Fix self-contradictory comment in sugov_iowait_apply() Zhongqiu Han
2026-07-03 10:17 ` Christian Loehle

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