@@ -1510,6 +1510,16 @@ static struct cftype throtl_legacy_files[] = {
.private = (unsigned long)&blkcg_policy_throtl,
.seq_show = blkg_print_stat_ios_recursive,
},
+#ifdef CONFIG_PSI
+ {
+ .name = "io.pressure",
+ .flags = CFTYPE_NO_PREFIX,
+ .seq_show = cgroup_io_pressure_show,
+ .write = cgroup_io_pressure_write,
+ .poll = cgroup_pressure_poll,
+ .release = cgroup_pressure_release,
+ },
+#endif /* CONFIG_PSI */
{ } /* terminate */
};
@@ -327,6 +327,16 @@ static struct cftype files[] = {
.name = "stat",
.seq_show = cpuacct_stats_show,
},
+#ifdef CONFIG_PSI
+ {
+ .name = "cpu.pressure",
+ .flags = CFTYPE_NO_PREFIX,
+ .seq_show = cgroup_cpu_pressure_show,
+ .write = cgroup_cpu_pressure_write,
+ .poll = cgroup_pressure_poll,
+ .release = cgroup_pressure_release,
+ },
+#endif /* CONFIG_PSI */
{ } /* terminate */
};
@@ -4391,6 +4391,16 @@ static struct cftype mem_cgroup_legacy_files[] = {
.write = mem_cgroup_reset,
.read_u64 = mem_cgroup_read_u64,
},
+#ifdef CONFIG_PSI
+ {
+ .name = "memory.pressure",
+ .flags = CFTYPE_NO_PREFIX,
+ .seq_show = cgroup_memory_pressure_show,
+ .write = cgroup_memory_pressure_write,
+ .poll = cgroup_pressure_poll,
+ .release = cgroup_pressure_release,
+ },
+#endif /* CONFIG_PSI */
{ }, /* terminate */
};
For cgroup v1, interfaces are under each subsystem. /sys/fs/cgroup/cpuacct/cpu.pressure /sys/fs/cgroup/memory/memory.pressure /sys/fs/cgroup/blkio/io.pressure Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com> --- block/blk-throttle.c | 10 ++++++++++ kernel/sched/cpuacct.c | 10 ++++++++++ mm/memcontrol.c | 10 ++++++++++ 3 files changed, 30 insertions(+)