[Devel] [PATCH RHEL COMMIT] mm/memcg: enable memory.high for cgroup v1.
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Sep 28 14:05:09 MSK 2021
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after ark-5.14
------>
commit ec8209c1703def2334c300626d9430c1ad0d1df9
Author: Vasily Averin <vvs at virtuozzo.com>
Date: Tue Sep 28 14:05:09 2021 +0300
mm/memcg: enable memory.high for cgroup v1.
This adds memory.high file in cgroup v1. Semantics is the
same as for cgroup v2.
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
(cherry picked from commit c432767aac6f77c2d8ffad588da89d0a66c29249)
VvS: rebase to rh9
https://jira.sw.ru/browse/PSBM-133990
Signed-off-by: Vasily Averin <vvs at virtuozzo.com>
---
mm/memcontrol.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index b64b4b2bdee0..9f231a39ea75 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5030,6 +5030,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[] = {
{
@@ -5067,6 +5070,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,
More information about the Devel
mailing list