linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH mm-unstable v2 0/5] Improve mem_cgroup_iter()
@ 2024-08-13 20:47 Kinsey Ho
  2024-08-13 20:47 ` [PATCH mm-unstable v2 1/5] cgroup: clarify css sibling linkage is protected by cgroup_mutex or RCU Kinsey Ho
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Kinsey Ho @ 2024-08-13 20:47 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, linux-kernel, cgroups, Yosry Ahmed, Roman Gushchin,
	Johannes Weiner, Michal Hocko, Shakeel Butt, Muchun Song,
	Tejun Heo, Zefan Li, mkoutny, Kinsey Ho

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/20240514202641.2821494-1-hannes@cmpxchg.org/
--

v2: 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/20240724190214.1108049-1-kinseyho@google.com/

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  |  6 +--
 kernel/cgroup/cgroup.c      | 16 +++----
 mm/memcontrol.c             | 84 +++++++++++++++----------------------
 4 files changed, 51 insertions(+), 61 deletions(-)

-- 
2.46.0.76.ge559c4bf1a-goog



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-08-20 12:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-13 20:47 [PATCH mm-unstable v2 0/5] Improve mem_cgroup_iter() Kinsey Ho
2024-08-13 20:47 ` [PATCH mm-unstable v2 1/5] cgroup: clarify css sibling linkage is protected by cgroup_mutex or RCU Kinsey Ho
2024-08-14  9:00   ` Michal Koutný
2024-08-13 20:47 ` [PATCH mm-unstable v2 2/5] mm: don't hold css->refcnt during traversal Kinsey Ho
2024-08-14  9:00   ` Michal Koutný
2024-08-16 16:15     ` Kinsey Ho
2024-08-13 20:47 ` [PATCH mm-unstable v2 3/5] mm: increment gen # before restarting traversal Kinsey Ho
2024-08-13 20:47 ` [PATCH mm-unstable v2 4/5] mm: restart if multiple traversals raced Kinsey Ho
2024-08-14  9:00   ` Michal Koutný
2024-08-16 16:27     ` Kinsey Ho
2024-08-20 11:59       ` Michal Koutný
2024-08-13 20:47 ` [PATCH mm-unstable v2 5/5] mm: clean up mem_cgroup_iter() Kinsey Ho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox