Hi Folks, This is a backport for PSI feature from: http://git.cmpxchg.org/cgit.cgi/linux-psi.git/log/?h=psi-4.17 The patches are included since 4.20. We're run LTP tests and stress test with these patches on 4.14.93, no problem found. I send them out for review, also maybe there are other guys are intereseted. I kept the conflict note in commit message, so it's easier to review. Regards, Jack Johannes Weiner (10): mm: workingset: don't drop refault information prematurely mm: workingset: tell cache transitions from workingset thrashing delayacct: track delays from thrashing cache pages sched: loadavg: consolidate LOAD_INT, LOAD_FRAC, CALC_LOAD sched: loadavg: make calc_load_n() public sched: sched.h: make rq locking and clock functions available in stats.h sched: introduce this_rq_lock_irq() psi: pressure stall information for CPU, memory, and IO psi: cgroup support psi: make disabling/enabling easier for vendor kernels Olof Johansson (1): kernel/sched/psi.c: simplify cgroup_move_task() Documentation/accounting/psi.txt | 73 ++ .../admin-guide/kernel-parameters.txt | 4 + Documentation/cgroup-v2.txt | 17 + .../platforms/cell/cpufreq_spudemand.c | 2 +- arch/powerpc/platforms/cell/spufs/sched.c | 9 +- arch/s390/appldata/appldata_os.c | 4 - drivers/cpuidle/governors/menu.c | 4 - fs/proc/loadavg.c | 3 - include/linux/cgroup-defs.h | 4 + include/linux/cgroup.h | 15 + include/linux/delayacct.h | 23 + include/linux/mmzone.h | 1 + include/linux/page-flags.h | 5 +- include/linux/psi.h | 54 ++ include/linux/psi_types.h | 92 +++ include/linux/sched.h | 10 + include/linux/sched/loadavg.h | 24 +- include/linux/swap.h | 2 +- include/trace/events/mmflags.h | 1 + include/uapi/linux/taskstats.h | 6 +- init/Kconfig | 28 + kernel/cgroup/cgroup.c | 44 +- kernel/debug/kdb/kdb_main.c | 7 +- kernel/delayacct.c | 15 + kernel/fork.c | 4 + kernel/sched/Makefile | 1 + kernel/sched/core.c | 16 +- kernel/sched/loadavg.c | 139 ++-- kernel/sched/psi.c | 772 ++++++++++++++++++ kernel/sched/sched.h | 175 ++-- kernel/sched/stats.h | 86 ++ mm/compaction.c | 5 + mm/filemap.c | 27 +- mm/huge_memory.c | 1 + mm/migrate.c | 2 + mm/page_alloc.c | 9 + mm/swap_state.c | 1 + mm/vmscan.c | 12 + mm/vmstat.c | 1 + mm/workingset.c | 117 ++- tools/accounting/getdelays.c | 8 +- 41 files changed, 1580 insertions(+), 243 deletions(-) create mode 100644 Documentation/accounting/psi.txt create mode 100644 include/linux/psi.h create mode 100644 include/linux/psi_types.h create mode 100644 kernel/sched/psi.c -- 2.17.1