Skip to content

Improve mem_cgroup_iter()

Kinsey Ho cgroups linux-mm lkml 4 versions – Applied

Status from this message: [merged mm-stable] mm-clean-up-mem_cgroup_iter.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 0 repliesApplied 5/5
  2. v35 patches 7 repliesSuperseded
  3. v25 patches 6 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches8 repliesSuperseded

Patches in v4 All 5 applied

#Subject and filesSizeRepliesApplied
1/5cgroup: clarify css sibling linkage is protected by cgroup_mutex or RCUinclude/linux/cgroup-defs.h kernel/cgroup/cgroup.c+14 -80 repliesApplied
2/5mm: don't hold css->refcnt during traversalmm/memcontrol.c+1 -170 repliesApplied
3/5mm: increment gen # before restarting traversalmm/memcontrol.c+12 -100 repliesApplied
4/5mm: restart if multiple traversals racedinclude/linux/memcontrol.h mm/memcontrol.c+19 -110 repliesApplied
5/5mm: clean up mem_cgroup_iter()mm/memcontrol.c+12 -200 repliesApplied

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchMichal KoutnýT.J. Mercier
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH mm-unstable v4 0/5] Improve mem_cgroup_iter()

Incremental cgroup iteration is being used again [1]. This patchset improves the reliability of mem_cgroup_iter(). It also improves simplicity and code readability.

[1] https://lore.kernel.org/[email protected]/
---
v4: Fixed memcg restart bug reported by hughd in v3, patch 4/5
v3: https://lore.kernel.org/[email protected]/
Removed __rcu tag from patch 2/5 which removes the need for rcu_dereference(). This helps readability.
v2: https://lore.kernel.org/[email protected]/
Add patch to clarify css sibling linkage is RCU protected. The kernel build bot RCU sparse error from v1 has been ignored.
v1: https://lore.kernel.org/[email protected]/

Kinsey Ho (5):
cgroup: clarify css sibling linkage is protected by cgroup_mutex or
RCU
mm: don't hold css->refcnt during traversal
mm: increment gen # before restarting traversal
mm: restart if multiple traversals raced
mm: clean up mem_cgroup_iter()

 include/linux/cgroup-defs.h |  6 ++-
 include/linux/memcontrol.h  |  4 +-
 kernel/cgroup/cgroup.c      | 16 +++----
 mm/memcontrol.c             | 84 ++++++++++++++++---------------------
 4 files changed, 51 insertions(+), 59 deletions(-)
Signature · 1 line
2.46.0.469.g59c65b2a67-goog