hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8JVN0
--------------------------------
Introduce per-memcg reclaim interface for cgroup v1.
Link:https://gitee.com/openeuler/kernel/commit/f698ccf83bfded5033bea769cd663c7d94... Signed-off-by: Lu Jialin lujialin4@huawei.com --- mm/memcontrol.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index deb664b48932..366f4d83d29b 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5087,6 +5087,8 @@ static ssize_t memory_low_write(struct kernfs_open_file *of, 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 ssize_t memory_reclaim(struct kernfs_open_file *of, char *buf, + size_t nbytes, loff_t off); static void __memcg_events_show(struct seq_file *m, atomic_long_t *events) { seq_printf(m, "low %lu\n", atomic_long_read(&events[MEMCG_LOW])); @@ -5306,6 +5308,10 @@ static struct cftype mem_cgroup_legacy_files[] = { .seq_show = memcg_high_async_ratio_show, .write = memcg_high_async_ratio_write, }, + { + .name = "reclaim", + .write = memory_reclaim, + }, #endif { }, /* terminate */ };