[PATCH 0/7 v3] move update blocked load outside newidle_balance
From: Vincent Guittot
Date: Fri Feb 12 2021 - 09:18:39 EST
Joel reported long preempt and irq off sequence in newidle_balance because
of a large number of CPU cgroups in use and having to be updated. This
patchset moves the update outside newidle_imblance. This enables to early
abort during the updates in case of pending irq as an example.
Instead of kicking a normal ILB that will wakes up CPU which is already
idle, patch 6 triggers the update of statistics in the idle thread of
the CPU before selecting and entering an idle state.
Changes on v3:
- Fixed a compilation error for !CONFIG_SMP && CONFIG_NO_HZ_COMMON
reported by kernel test robot <lkp@xxxxxxxxx>
- Took advantage of this new version to add a short desciption for
nohz_run_idle_balance
Changes on v2:
- Fixed some typos and updated some comments
- Added more cleanup
- Changed to way to trigger ILB in idle thread context to remove a possible
race condition between the normal softirq ILB and this new mecanism. The
cpu can already be set in idle_cpus_mask because even if the cpu is added
later when entering idle, it might not have been removed yet from previous
idle phase.
Vincent Guittot (7):
sched/fair: remove update of blocked load from newidle_balance
sched/fair: remove unused return of _nohz_idle_balance
sched/fair: remove unused parameter of update_nohz_stats
sched/fair: merge for each idle cpu loop of ILB
sched/fair: reorder newidle_balance pulled_task tests
sched/fair: trigger the update of blocked load on newly idle cpu
sched/fair: reduce the window for duplicated update
kernel/sched/fair.c | 118 +++++++++++++++++--------------------------
kernel/sched/idle.c | 6 +++
kernel/sched/sched.h | 5 ++
3 files changed, 57 insertions(+), 72 deletions(-)
--
2.17.1