Skip to content

RFC introduce new attribute "priority" to control group

[email protected] cgroups 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest2 patches 1 replyIn review
  2. v1 RFC1 patch 3 repliesSuperseded

V2->V1 from the cover letter

1. Introduce prioritized oom in memcg.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2cgroup: add support for cgroup priorityinclude/linux/cgroup-defs.h include/linux/cgroup.h kernel/cgroup/cgroup.c+94 -00 replies
2/2memcg: introduce prioritized oom in memcginclude/linux/memcontrol.h include/linux/oom.h mm/memcontrol.c +1 more+139 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC v2 0/2] introduce new attribute "priority" to control group

From: Yulei Zhang <[email protected]>

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(-)
Signature · 1 line
2.28.0