From: Yulei Zhang <yuleixzhang@xxxxxxxxxxx> Last time we introduce the idea of adding prioritized tasks management to control group. Sometimes we may assign the same amount of resources to multiple cgroups due to the environment restriction, but we still hope there are preference order to handle the tasks in those cgroups, the 'prio' attribute may help to do the ranking jobs. The default value of "priority" is set to 0 which means the highest priority, and the totally levels of priority is defined by CGROUP_PRIORITY_MAX. Each subsystem could register callback to receive the priority change notification for their own purposes. In this v2 patch we apply a simple rule to the oom hanlder base on the order of priority to demonstrate the intention about adding this attribute. When enable the prioritized oom, it will perfer to pick up the victim from the memory cgroup with lower priority, and try the best to keep the tasks alive in high ranked memcg. V2->V1: 1. Introduce prioritized oom in memcg. Lei Chen (1): cgroup: add support for cgroup priority Yulei Zhang (1): memcg: introduce prioritized oom in memcg include/linux/cgroup-defs.h | 2 + include/linux/cgroup.h | 2 + include/linux/memcontrol.h | 38 ++++++++++++++ include/linux/oom.h | 1 + kernel/cgroup/cgroup.c | 90 +++++++++++++++++++++++++++++++++ mm/memcontrol.c | 99 ++++++++++++++++++++++++++++++++++++- mm/oom_kill.c | 6 +-- 7 files changed, 233 insertions(+), 5 deletions(-) -- 2.28.0