Commit 925b5be0 authored by Zhou Guanghui's avatar Zhou Guanghui Committed by Yang Yingliang
Browse files

shmem/ascend: charge pages to the memcg of current task

ascend inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4EUVI


CVE: NA

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

In the share pool scenario, when the shared memory is applied
for, the do_mm_populate function is performed at the same time,
that is, the corresponding pages are allocated. In the current
share pool implementation, the memory is charged to the memcg of
the first task added to this share pool group.

This is unreasonable and may cause memcg of first task oom.
So, we should charge the pages to the memcg of current task.

Signed-off-by: default avatarZhou Guanghui <zhouguanghui1@huawei.com>
Reviewed-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 7ef56b57
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment