linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [LSF/MM/BPF TOPIC] Reducing zombie memcgs
@ 2023-04-11 23:36 T.J. Mercier
  2023-04-11 23:48 ` Yosry Ahmed
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: T.J. Mercier @ 2023-04-11 23:36 UTC (permalink / raw)
  To: lsf-pc
  Cc: linux-mm, cgroups, Yosry Ahmed, Tejun Heo, Shakeel Butt,
	Muchun Song, Johannes Weiner, Roman Gushchin, Alistair Popple,
	Jason Gunthorpe, Kalesh Singh, Yu Zhao

When a memcg is removed by userspace it gets offlined by the kernel.
Offline memcgs are hidden from user space, but they still live in the
kernel until their reference count drops to 0. New allocations cannot
be charged to offline memcgs, but existing allocations charged to
offline memcgs remain charged, and hold a reference to the memcg.

As such, an offline memcg can remain in the kernel indefinitely,
becoming a zombie memcg. The accumulation of a large number of zombie
memcgs lead to increased system overhead (mainly percpu data in struct
mem_cgroup). It also causes some kernel operations that scale with the
number of memcgs to become less efficient (e.g. reclaim).

There are currently out-of-tree solutions which attempt to
periodically clean up zombie memcgs by reclaiming from them. However
that is not effective for non-reclaimable memory, which it would be
better to reparent or recharge to an online cgroup. There are also
proposed changes that would benefit from recharging for shared
resources like pinned pages, or DMA buffer pages.

Suggested attendees:
Yosry Ahmed <yosryahmed@google.com>
Yu Zhao <yuzhao@google.com>
T.J. Mercier <tjmercier@google.com>
Tejun Heo <tj@kernel.org>
Shakeel Butt <shakeelb@google.com>
Muchun Song <muchun.song@linux.dev>
Johannes Weiner <hannes@cmpxchg.org>
Roman Gushchin <roman.gushchin@linux.dev>
Alistair Popple <apopple@nvidia.com>
Jason Gunthorpe <jgg@nvidia.com>
Kalesh Singh <kaleshsingh@google.com>


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

end of thread, other threads:[~2023-05-29 19:31 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-11 23:36 [LSF/MM/BPF TOPIC] Reducing zombie memcgs T.J. Mercier
2023-04-11 23:48 ` Yosry Ahmed
2023-04-25 11:36   ` Yosry Ahmed
2023-04-25 18:42     ` Waiman Long
2023-04-25 18:53       ` Yosry Ahmed
2023-04-26 20:15         ` Waiman Long
2023-05-01 16:38     ` Roman Gushchin
2023-05-02  7:18       ` Yosry Ahmed
2023-05-02 20:02       ` Yosry Ahmed
2023-05-03 22:15 ` Chris Li
2023-05-04 11:58   ` Alistair Popple
2023-05-04 15:31     ` Chris Li
2023-05-05 13:53       ` Alistair Popple
2023-05-06 22:49         ` Chris Li
2023-05-08  8:17           ` Alistair Popple
2023-05-10 14:51             ` Chris Li
2023-05-12  8:45               ` Alistair Popple
2023-05-12 21:09                 ` Jason Gunthorpe
2023-05-16 12:21                   ` Alistair Popple
2023-05-19 15:47                     ` Jason Gunthorpe
2023-05-20 15:09                   ` Chris Li
2023-05-20 15:31                 ` Chris Li
2023-05-29 19:31                   ` Jason Gunthorpe
2023-05-04 17:02   ` Shakeel Butt
2023-05-04 17:36     ` Chris Li
2023-05-12  3:08 ` Yosry Ahmed

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