Skip to content

cgroup: Miscellaneous bug fixes and enhancements

Waiman Long requested to merge llong1/centos-stream-9:bz2060150_cgroup into main

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2060150
MR: !609 (merged)

This patchset pulls in miscellaneous cgroup fixes and enhancements.

[v3: Drop commit a06247c6804f as it has been merged and also drop commit b1e2c8df0f00 ("cgroup: use irqsave in cgroup_rstat_flush_locked().") as it may cause performance regression.] [v4: Drop bpf commits as they have been merged. Drop commit 0061270307f2 ("group: cgroup-v1: do not exclude cgrp_dfl_root") as it cause network performance regression, and add back commit b1e2c8df0f00 ("cgroup: use irqsave in cgroup_rstat_flush_locked().")]

Signed-off-by: Waiman Long longman@redhat.com

Waiman Long (12):
  cgroup/cpuset: Change references of cpuset_mutex to cpuset_rwsem
  cgroup: reduce dependency on cgroup_mutex
  cgroup: remove cgroup_mutex from cgroupstats_build
  cgroup: no need for cgroup_mutex for /proc/cgroups
  cgroup: Fix rootcg cpu.stat guest double counting
  mm/page_alloc: detect allocation forbidden by cpuset and bail out
    early
  cgroup/cpuset: Don't let child cpusets restrict parent in default
    hierarchy
  cgroup/cpuset: Make child cpusets restrict parents on v1 hierarchy
  psi: Fix uaf issue when psi trigger is destroyed while being polled
  cgroup/cpuset: Fix a race between cpuset_attach() and cpu hotplug
  cgroup-v1: Correct privileges check in release_agent writes
  cgroup: use irqsave in cgroup_rstat_flush_locked().

 Documentation/accounting/psi.rst |   3 +-
 include/linux/cpuset.h           |  17 ++++
 include/linux/mmzone.h           |  22 ++++++
 include/linux/psi.h              |   2 +-
 include/linux/psi_types.h        |   3 -
 kernel/cgroup/cgroup-v1.c        |  20 ++---
 kernel/cgroup/cgroup.c           |  62 +++++++++------
 kernel/cgroup/cpuset.c           | 131 +++++++++++++++++++++----------
 kernel/cgroup/rstat.c            |  15 +++-
 kernel/sched/psi.c               |  66 +++++++---------
 mm/page_alloc.c                  |  13 +++
 11 files changed, 229 insertions(+), 125 deletions(-)
Edited by Waiman Long

Merge request reports