Skip to content
Snippets Groups Projects
Commit cf3824ab authored by YueHaibing's avatar YueHaibing Committed by Todd Kjos
Browse files

BACKPORT: sched/fair: Move update_nohz_stats() to the CONFIG_NO_HZ_COMMON...

BACKPORT: sched/fair: Move update_nohz_stats() to the CONFIG_NO_HZ_COMMON block to simplify the code & fix an unused function warning

commit 3f5ad914 upstream.

When !CONFIG_NO_HZ_COMMON we get this new GCC warning:

   kernel/sched/fair.c:8398:13: warning: ‘update_nohz_stats’ defined but not used [-Wunused-function]

Move update_nohz_stats() to an already existing CONFIG_NO_HZ_COMMON #ifdef
block.

Beyond fixing the GCC warning, this also simplifies the update_nohz_stats() function.

[ mingo: Rewrote the changelog. ]

Fixes: 0826530d ("sched/fair: Remove update of blocked load from newidle_balance")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Reviewed-by: default avatarVincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20210329144029.29200-1-yuehaibing@huawei.com



[ slightly refactored to match original version of update_nohz_stats
so this patch is just a cut/paste ]
Signed-off-by: default avatarTodd Kjos <tkjos@google.com>
Change-Id: Ib864133885495867e1c95d3a5f502b703721feaf
parent 154d9fa3
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment