Skip to content

mm: zswap: add per-memcg stat for incompressible pages

Jiayuan Chen cgroups linux-doc linux-kselftest linux-mm lkml 3 versions – Applied

Status from this message: [merged mm-stable] selftests-cgroup-add-test-for-zswap-incompressible-pages.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 0 repliesApplied 2/2
  2. v22 patches 8 repliesSuperseded
  3. v11 patch 14 repliesSuperseded

Changes in v3 from the cover letter

https://lore.kernel.org/linux-mm/[email protected]/

- Remove inline comments for incompressibility check (Yosry Ahmed)
- Use PAGE_SIZE instead of hardcoded 4096 in selftest (SeongJae Park)
- Use pipe for parent-child synchronization instead of usleep (JP Kobryn, SeongJae Park)
- Use MADV_PAGEOUT instead of memory.reclaim to push pages into zswap, and use mmap instead of malloc accordingly (Nhat Pham)
- Collect Reviewed-by and Acked-by tags

Patches in v3 All 2 applied

#Subject and filesSizeRepliesApplied
1/2mm: zswap: add per-memcg stat for incompressible pagesDocumentation/admin-guide/cgroup-v2.rst include/linux/memcontrol.h mm/memcontrol.c+12 -00 repliesApplied
2/2selftests/cgroup: add test for zswap incompressible pagestools/testing/selftests/cgroup/test_zswap.c+136 -00 repliesApplied

Reviews trailers per patch

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

PatchNhat PhamShakeel ButtYosry AhmedSeongJae Park
1/2A-b A-b R-b R-b
2/2A-b A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v3 thread

Cover letter [PATCH mm-new v3 0/2] mm: zswap: add per-memcg stat for incompressible pages

In containerized environments, knowing which cgroup is contributing incompressible pages to zswap is essential for effective resource management. This series adds a new per-memcg stat 'zswap_incomp' to track incompressible pages, along with a selftest.

Patch 1: Add the per-memcg zswap_incomp stat and documentation Patch 2: Add selftest for the new stat

Changes v2 -> v3:
https://lore.kernel.org/linux-mm/[email protected]/

- Remove inline comments for incompressibility check (Yosry Ahmed)
- Use PAGE_SIZE instead of hardcoded 4096 in selftest (SeongJae Park)
- Use pipe for parent-child synchronization instead of usleep (JP Kobryn, SeongJae Park)
- Use MADV_PAGEOUT instead of memory.reclaim to push pages into zswap, and use mmap instead of malloc accordingly (Nhat Pham)
- Collect Reviewed-by and Acked-by tags

Changes v1 -> v2:
https://lore.kernel.org/linux-mm/[email protected]/

- Rename zswpraw/MEMCG_ZSWAP_RAW to zswap_incomp/MEMCG_ZSWAP_INCOMP (Shakeel Butt, Yosry Ahmed)
- Drop zswap_is_incomp() helper, keep opencode (size == PAGE_SIZE) with comments explaining the incompressibility check (Yosry Ahmed)
- Add documentation in cgroup-v2.rst (Nhat Pham, SeongJae Park)
- Add selftest as a separate patch (Nhat Pham)
- Add reference link to Chris Li's discussion on the need for per-memcg incompressible page tracking (Nhat Pham)

Jiayuan Chen (2):
mm: zswap: add per-memcg stat for incompressible pages selftests/cgroup: add test for zswap incompressible pages

 Documentation/admin-guide/cgroup-v2.rst     |   5 +
 include/linux/memcontrol.h                  |   1 +
 mm/memcontrol.c                             |   6 +
 tools/testing/selftests/cgroup/test_zswap.c | 136 ++++++++++++++++++++
 4 files changed, 148 insertions(+)
Signature · 1 line
2.43.0