All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] zswap: accounting & cgroup control
@ 2022-05-10 15:28 ` Johannes Weiner
  0 siblings, 0 replies; 47+ messages in thread
From: Johannes Weiner @ 2022-05-10 15:28 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Michal Hocko, Roman Gushchin, Shakeel Butt, Seth Jennings,
	Dan Streetman, Minchan Kim, linux-mm, cgroups, linux-kernel,
	kernel-team

Changelog

- Refresh and update meminfo documentation (Andrew)
- Discussions around stat sharing opportunities with zram. But agreed
  that zswap is a cache and zram a backend that could theoretically be
  stacked, so they need to be understandable separately. (Minchan)

Overview

Zswap can consume nearly a quarter of RAM in the default
configuration, yet it's neither listed in /proc/meminfo, nor is it
accounted and manageable on a per-cgroup basis.

This makes reasoning about the memory situation on a host in general
rather difficult. On shared/cgrouped hosts, the consequences are
worse. First, workloads can escape memory containment and cause
resource priority inversions: a lo-pri group can fill the global zswap
pool and force a hi-pri group out to disk. Second, not all workloads
benefit from zswap equally. Some even suffer when memory contents
compress poorly, and are better off going to disk swap directly. On a
host with mixed workloads, it's currently not possible to enable zswap
for one workload but not for the other.

This series implements the missing global accounting as well as cgroup
tracking & control for zswap backing memory:

- Patch 1 refreshes the very out-of-date meminfo documentation in
  Documentation/filesystems/proc.rst.

- Patches 2-4 clean up related and adjacent options in Kconfig. Not
  actual dependencies, just things I noticed during development.

- Patch 5 adds meminfo and vmstat coverage for zswap consumption and
  activity.

- Patch 6 implements per-cgroup tracking & control of zswap memory.

Based on v5.18-rc4-mmots-2022-04-26-19-34-5-g5e1fdb02de7a.

 Documentation/admin-guide/cgroup-v2.rst |  21 ++
 Documentation/filesystems/proc.rst      | 161 +++++----
 drivers/block/zram/Kconfig              |   3 +-
 fs/proc/meminfo.c                       |   7 +
 include/linux/memcontrol.h              |  54 +++
 include/linux/swap.h                    |   5 +
 include/linux/vm_event_item.h           |   4 +
 init/Kconfig                            | 123 -------
 mm/Kconfig                              | 523 +++++++++++++++++++-----------
 mm/memcontrol.c                         | 196 ++++++++++-
 mm/vmstat.c                             |   4 +
 mm/zswap.c                              |  50 ++-
 12 files changed, 753 insertions(+), 398 deletions(-)



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

end of thread, other threads:[~2022-05-18  8:23 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10 15:28 [PATCH v2 0/6] zswap: accounting & cgroup control Johannes Weiner
2022-05-10 15:28 ` Johannes Weiner
2022-05-10 15:28 ` [PATCH v2 1/6] Documentation: filesystems: proc: update meminfo section Johannes Weiner
2022-05-10 15:28   ` Johannes Weiner
2022-05-11 17:11   ` David Hildenbrand
2022-05-11 17:11     ` David Hildenbrand
2022-05-11 18:51     ` Johannes Weiner
2022-05-11 18:51       ` Johannes Weiner
2022-05-12  8:55       ` David Hildenbrand
2022-05-12  8:55         ` David Hildenbrand
2022-05-10 15:28 ` [PATCH v2 2/6] mm: Kconfig: move swap and slab config options to the MM section Johannes Weiner
2022-05-10 15:28   ` Johannes Weiner
2022-05-10 15:28 ` [PATCH v2 3/6] mm: Kconfig: group swap, slab, hotplug and thp options into submenus Johannes Weiner
2022-05-10 15:28   ` Johannes Weiner
2022-05-10 22:40   ` Andrew Morton
2022-05-10 22:40     ` Andrew Morton
2022-05-11 15:22     ` Johannes Weiner
2022-05-11 15:22       ` Johannes Weiner
2022-05-11 16:28       ` Johannes Weiner
2022-05-11 16:28         ` Johannes Weiner
2022-05-10 15:28 ` [PATCH v2 4/6] mm: Kconfig: simplify zswap configuration Johannes Weiner
2022-05-10 15:28   ` Johannes Weiner
2022-05-10 15:28 ` [PATCH v2 5/6] mm: zswap: add basic meminfo and vmstat coverage Johannes Weiner
2022-05-10 15:28   ` Johannes Weiner
2022-05-11 17:13   ` David Hildenbrand
2022-05-11 17:13     ` David Hildenbrand
2022-05-10 15:28 ` [PATCH v2 6/6] zswap: memcg accounting Johannes Weiner
2022-05-10 15:28   ` Johannes Weiner
2022-05-11 17:32   ` Michal Koutný
2022-05-11 17:32     ` Michal Koutný
2022-05-11 19:06     ` Johannes Weiner
2022-05-11 19:06       ` Johannes Weiner
2022-05-13 15:14       ` Michal Koutný
2022-05-13 15:14         ` Michal Koutný
2022-05-13 17:08         ` Johannes Weiner
2022-05-13 17:08           ` Johannes Weiner
2022-05-16 14:34           ` Michal Koutný
2022-05-16 14:34             ` Michal Koutný
2022-05-16 20:01             ` Johannes Weiner
2022-05-16 20:01               ` Johannes Weiner
2022-05-17 23:52               ` Andrew Morton
2022-05-18  8:23                 ` Michal Koutný
2022-05-18  8:23                   ` Michal Koutný
2022-05-13 17:23   ` Shakeel Butt
2022-05-13 17:23     ` Shakeel Butt
2022-05-13 18:25     ` Johannes Weiner
2022-05-13 18:25       ` Johannes Weiner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.