• T
    mm: memcontrol: add the flag_stat file · 5cda4079
    tatataeki 提交于
    hulk inclusion
    category: feature
    bugzilla: https://gitee.com/openeuler/kernel/issues/I4MC3F
    CVE: NA
    
    ----------------------------------
    
    Multiple operations on cgroups in cgroup v1 are related to the status
    of the cgroup. The status of the current cgroup can be displayed in
    cgroupv2, but it cannot be displayed in cgroup v1, so the
    cgroup.flag_stat member is added in memory cgroup to display the
    status of the current cgroup and sub-cgroups.
    
    Testing result:
    List the status of user.slice
    [root@test user.slice]#cat memory.flag_stat
    NO_REF 0
    ONLINE 1
    RELEASED 0
    VISIBLE 1
    DYING 0
    CHILD_NO_REF 0
    CHILD_ONLINE 1
    CHILD_RELEASED 0
    CHILD_VISIBLE 1
    CHILD_DYING 0
    
    Create a new cgroup in user.slice
    [root@test user.slice]#mkdir user-test
    
    List the current status of user.slice after operation above
    [root@test user.slice]#cat memory.flag_stat
    NO_REF 0
    ONLINE 1
    RELEASED 0
    VISIBLE 1
    DYING 0
    CHILD_NO_REF 0
    CHILD_ONLINE 2
    CHILD_RELEASED 0
    CHILD_VISIBLE 2
    CHILD_DYING 0
    Signed-off-by: Ntatataeki <shengzeyu19_98@163.com>
    Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
    Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com>
    Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
    5cda4079
memcontrol.c 200.7 KB