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 2a86507aa7f7..2489f59ddd5a 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5092,6 +5092,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])); @@ -5311,6 +5313,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 */ };