This adds memory.high file in cgroup v1. Semantics is the same as for cgroup v2.
Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> (cherry picked from commit c432767aac6f77c2d8ffad588da89d0a66c29249) VvS: rebase to rh9 https://jira.sw.ru/browse/PSBM-133990 Signed-off-by: Vasily Averin <v...@virtuozzo.com> --- mm/memcontrol.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 0ad4b3906279..88e156fdb00d 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -4918,6 +4918,9 @@ static ssize_t memcg_write_event_control(struct kernfs_open_file *of, static ssize_t memory_low_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off); static int memory_low_show(struct seq_file *m, void *v); +static int memory_high_show(struct seq_file *m, void *v); +static ssize_t memory_high_write(struct kernfs_open_file *of, + char *buf, size_t nbytes, loff_t off); static struct cftype mem_cgroup_legacy_files[] = { { @@ -4955,6 +4958,12 @@ static struct cftype mem_cgroup_legacy_files[] = { .write = memory_low_write, .seq_show = memory_low_show, }, + { + .name = "high", + .flags = CFTYPE_NOT_ON_ROOT, + .seq_show = memory_high_show, + .write = memory_high_write, + }, { .name = "stat", .seq_show = memcg_stat_show, -- 2.25.1 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel