Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] mm: memcontrol: constify the read side of the memcg API
@ 2026-09-02 19:27 Tal Zussman
  2026-09-02 19:27 ` [PATCH 01/11] mm: memcontrol: take a const folio in folio_memcg() and friends Tal Zussman
                   ` (10 more replies)
  0 siblings, 11 replies; 14+ messages in thread
From: Tal Zussman @ 2026-09-02 19:27 UTC (permalink / raw)
  To: Johannes Weiner, Michal Hocko, Roman Gushchin, Shakeel Butt,
	Muchun Song, Andrew Morton, Chris Li, Kairui Song, Kemeng Shi,
	Nhat Pham, Baoquan He, Barry Song, Youngjun Park,
	David Hildenbrand, Lorenzo Stoakes, Liam R. Howlett,
	Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Qi Zheng,
	Axel Rasmussen, Yuanchu Xie, Wei Xu, Matthew Wilcox (Oracle)
  Cc: cgroups, linux-mm, linux-kernel, Tal Zussman

The memcg accessors, lruvec helpers, and stat readers only read from
the memcg, folio, or lruvec they are given, but take non-const
pointers. Constify them, along with a couple other helper functions in
mm/page_counter.c along the way. 

This started as a follow-up to [1] that quickly grew in proportions :)

[1]: https://lore.kernel.org/linux-mm/anYqSDnC2BbJXv1h@casper.infradead.org/

---
Tal Zussman (11):
      mm: memcontrol: take a const folio in folio_memcg() and friends
      mm: memcontrol: constify obj_cgroup_memcg() and friends
      mm: memcontrol: constify the lruvec helpers
      mm/page_io: take a const folio in bio_associate_blkg_from_folio()
      mm: memcontrol: constify the mem_cgroup accessors
      mm: page_counter: constify page_counter_read() and page_counter_margin()
      mm: memcontrol: constify the reclaim protection helpers
      mm: memcontrol: constify the memcg and lruvec stat readers
      mm: memcontrol: constify the swap accounting helpers
      mm: memcontrol: constify mem_cgroup_swappiness() and mem_cgroup_get_max()
      mm: memcontrol: constify the zswap and socket pressure helpers

 include/linux/memcontrol.h   | 196 ++++++++++++++++++++++---------------------
 include/linux/mmzone.h       |   2 +-
 include/linux/page_counter.h |   4 +-
 include/linux/swap.h         |  12 +--
 mm/memcontrol.c              |  37 ++++----
 mm/page_counter.c            |   2 +-
 mm/page_io.c                 |  14 ++--
 mm/swap.h                    |   2 +-
 8 files changed, 138 insertions(+), 131 deletions(-)
---
base-commit: 178b3d97bf1f15f598ea7cc615a40c115e528e1c
change-id: 20260807-folio_memcg-const-4a67e40d485b

Best regards,
--  
Tal Zussman <tz2294@columbia.edu>



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

end of thread, other threads:[~2026-09-04 21:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02 19:27 [PATCH 00/11] mm: memcontrol: constify the read side of the memcg API Tal Zussman
2026-09-02 19:27 ` [PATCH 01/11] mm: memcontrol: take a const folio in folio_memcg() and friends Tal Zussman
2026-09-02 19:27 ` [PATCH 02/11] mm: memcontrol: constify obj_cgroup_memcg() " Tal Zussman
2026-09-02 19:27 ` [PATCH 03/11] mm: memcontrol: constify the lruvec helpers Tal Zussman
2026-09-04 21:35   ` Tal Zussman
2026-09-02 19:27 ` [PATCH 04/11] mm/page_io: take a const folio in bio_associate_blkg_from_folio() Tal Zussman
2026-09-02 19:27 ` [PATCH 05/11] mm: memcontrol: constify the mem_cgroup accessors Tal Zussman
2026-09-02 19:27 ` [PATCH 06/11] mm: page_counter: constify page_counter_read() and page_counter_margin() Tal Zussman
2026-09-02 19:27 ` [PATCH 07/11] mm: memcontrol: constify the reclaim protection helpers Tal Zussman
2026-09-02 19:27 ` [PATCH 08/11] mm: memcontrol: constify the memcg and lruvec stat readers Tal Zussman
2026-09-04 21:42   ` Tal Zussman
2026-09-02 19:27 ` [PATCH 09/11] mm: memcontrol: constify the swap accounting helpers Tal Zussman
2026-09-02 19:27 ` [PATCH 10/11] mm: memcontrol: constify mem_cgroup_swappiness() and mem_cgroup_get_max() Tal Zussman
2026-09-02 19:27 ` [PATCH 11/11] mm: memcontrol: constify the zswap and socket pressure helpers Tal Zussman

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