提交 c4bcb43e 编写于 作者: M Ma Wupeng 提交者: Yang Yingliang

mm: Show correct reliable_user_used if PAGE_SIZE is not 4K

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S
CVE: NA

--------------------------------

Previous reliable_user_used was wrong if PAGE_SIZE is not 4K because this
num was calculated by 4 * reliable_user_used_nr_page.

Now reliable_user_used is calculated by (PAGE_SHIFT - 10) *
reliable_user_used_nr_page.
Signed-off-by: NMa Wupeng <mawupeng1@huawei.com>
Reviewed-by: Kefeng Wang<wangkefeng.wang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 5c43ab17
......@@ -514,7 +514,8 @@ void reliable_show_mem_info(void)
pr_info("task_reliable_limit: %lu kB",
task_reliable_limit >> 10);
pr_info("reliable_user_used: %ld kB",
atomic_long_read(&reliable_user_used_nr_page) * 4);
atomic_long_read(&reliable_user_used_nr_page) <<
(PAGE_SHIFT - 10));
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册