[PATCH v2 0/4] psi: Add PSI_CPU_FULL state and some code optimization

From: Chengming Zhou
Date: Wed Mar 03 2021 - 06:41:02 EST


This patch series is RESEND of the previous patches on psi subsystem. A few
weeks passed since the last review, so I put them together and resend for
more convenient review and merge.

Patch 1 add PSI_CPU_FULL state means all non-idle tasks in a cgroup are delayed
on the CPU resource which used by others outside of the cgroup or throttled
by the cgroup cpu.max configuration.

Patch 2 use ONCPU state and the current in_memstall flag to detect reclaim,
remove the hook in timer tick to make code more concise and maintainable.
And patch 3 adds unlikely() annotations to move the pressure state branches
out of line to eliminate undesirable jumps during wakeup and sleeps.

Patch 4 optimize the voluntary sleep switch by remove one call of
psi_group_change() for every common cgroup ancestor of the two tasks.

Chengming Zhou (3):
psi: Add PSI_CPU_FULL state
psi: Use ONCPU state tracking machinery to detect reclaim
psi: Optimize task switch inside shared cgroups

Johannes Weiner (1):
psi: pressure states are unlikely

include/linux/psi.h | 1 -
include/linux/psi_types.h | 3 +-
kernel/sched/core.c | 1 -
kernel/sched/psi.c | 122 ++++++++++++++++++++++++----------------------
kernel/sched/stats.h | 37 +++++---------
5 files changed, 78 insertions(+), 86 deletions(-)

--
2.11.0