• W
    alinux: mm: memcontrol: introduce memcg priority oom · 52e375fc
    Wenwei Tao 提交于
    Under memory pressure reclaim and oom would happen, with multiple
    cgroups exist in one system, we might want some of their memory
    or tasks survived the reclaim and oom while there are other
    candidates.
    
    The @memory.low and @memory.min have make that happen during reclaim,
    this patch introduces memcg priority oom to meet above requirement in
    the oom.
    
    The priority is from 0 to 12, the higher number the higher priority.
    When oom happens it always choose victim from low priority memcg.
    And it works both for memcg oom and global oom, it can be enabled/disabled
    through @memory.use_priority_oom, for global oom through the root
    memcg's @memory.use_priority_oom, it is disabled by default.
    Signed-off-by: NWenwei Tao <wenwei.tao@linux.alibaba.com>
    Reviewed-by: NXunlei Pang <xlpang@linux.alibaba.com>
    52e375fc
memcontrol.h 35.3 KB