提交 e946b0e0 编写于 作者: L Lu Jialin 提交者: Zheng Zengkai

memcg: Fix the problem of cat memory.high_async_ratio

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: NLu Jialin <lujialin4@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 d014172f
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册