From: Lu Jialin lujialin4@huawei.com
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4IMAK CVE: NA
--------
The patch fixes the problem of cat memory.high_async_ratio. After this patch, when user cat memory.high_async_ratio, the correct memory.high_async_ratio will be shown.
Show case: /sys/fs/cgroup/test # cat memory.high_async_ratio 0 /sys/fs/cgroup/test # echo 90 > memory.high_async_ratio /sys/fs/cgroup/test # cat memory.high_async_ratio 90 /sys/fs/cgroup/test # echo 85 > memory.high_async_ratio /sys/fs/cgroup/test # cat memory.high_async_ratio 85
Signed-off-by: Lu Jialin lujialin4@huawei.com Reviewed-by: Kefeng Wang wangkefeng.wang@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- mm/memcontrol.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 0082942c9753..ac07a0ffbe20 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5291,8 +5291,9 @@ static ssize_t memory_reclaim(struct kernfs_open_file *of, char *buf,
static int memcg_high_async_ratio_show(struct seq_file *m, void *v) { - return seq_puts_memcg_tunable(m, - READ_ONCE(mem_cgroup_from_seq(m)->high_async_ratio)); + seq_printf(m, "%d\n", + READ_ONCE(mem_cgroup_from_seq(m)->high_async_ratio)); + return 0; }
static ssize_t memcg_high_async_ratio_write(struct kernfs_open_file *of,