All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: Tal Zussman <tz2294@columbia.edu>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@kernel.org>,
	 Roman Gushchin <roman.gushchin@linux.dev>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	 Muchun Song <muchun.song@linux.dev>,
	Andrew Morton <akpm@linux-foundation.org>,
	 Chris Li <chrisl@kernel.org>, Kairui Song <kasong@tencent.com>,
	 Kemeng Shi <shikemeng@huaweicloud.com>,
	Nhat Pham <nphamcs@gmail.com>, Baoquan He <baoquan.he@linux.dev>,
	 Barry Song <baohua@kernel.org>,
	Youngjun Park <youngjun.park@lge.com>,
	 David Hildenbrand <david@kernel.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	 Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>,
	 Suren Baghdasaryan <surenb@google.com>,
	Qi Zheng <qi.zheng@linux.dev>,
	 Axel Rasmussen <axelrasmussen@google.com>,
	Yuanchu Xie <yuanchu@google.com>, Wei Xu <weixugc@google.com>,
	 "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	cgroups@vger.kernel.org, linux-mm@kvack.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 00/11] mm: memcontrol: constify the read side of the memcg API
Date: Wed, 16 Sep 2026 14:34:11 +0100	[thread overview]
Message-ID: <aqqaaDqTDahlZ7bR@gremlin> (raw)
In-Reply-To: <20260908-folio_memcg-const-v2-0-811e9f443409@columbia.edu>

On Tue, Sep 08, 2026 at 11:57:36AM -0400, Tal Zussman wrote:
> 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/

:)

I looked through it, all looks sensible, and it compiles locally and
const-ifies things so it's all good AFAIC! So:

Acked-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>

For the whole series :)

>
> ---
> Changes in v2:
> - Patch 3: Constify the folio argument of folio_lruvec_relock_irq() and
>   folio_lruvec_relock_irqsave() as well, per Sashiko
> - Patch 3: Note that mem_cgroup_lruvec() updates lruvec->pgdat in the
>   per-node structure, not the memcg, per Sashiko
> - Patches 3 and 8: Use container_of_const() in lruvec_memcg() and the
>   lruvec_page_state() family, per Sashiko
> - Link to v1: https://patch.msgid.link/20260902-folio_memcg-const-v1-0-e2c1da22246d@columbia.edu
>
> ---
> 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   | 204 ++++++++++++++++++++++---------------------
>  include/linux/mmzone.h       |   2 +-
>  include/linux/page_counter.h |   4 +-
>  include/linux/swap.h         |  12 +--
>  mm/memcontrol.c              |  49 ++++++-----
>  mm/page_counter.c            |   2 +-
>  mm/page_io.c                 |  14 +--
>  mm/swap.h                    |   2 +-
>  8 files changed, 148 insertions(+), 141 deletions(-)
> ---
> base-commit: 9d3243fc689fef444f87e0a703b4c99653137e1b
> change-id: 20260807-folio_memcg-const-4a67e40d485b
>
> Best regards,
> --
> Tal Zussman <tz2294@columbia.edu>
>

--
Cheers, Lorenzo


      parent reply	other threads:[~2026-09-16 13:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08 15:57 [PATCH v2 00/11] mm: memcontrol: constify the read side of the memcg API Tal Zussman
2026-09-08 15:57 ` [PATCH v2 01/11] mm: memcontrol: take a const folio in folio_memcg() and friends Tal Zussman
2026-09-08 15:57 ` [PATCH v2 02/11] mm: memcontrol: constify obj_cgroup_memcg() " Tal Zussman
2026-09-08 15:57 ` [PATCH v2 03/11] mm: memcontrol: constify the lruvec helpers Tal Zussman
2026-09-08 15:57 ` [PATCH v2 04/11] mm/page_io: take a const folio in bio_associate_blkg_from_folio() Tal Zussman
2026-09-08 15:57 ` [PATCH v2 05/11] mm: memcontrol: constify the mem_cgroup accessors Tal Zussman
2026-09-08 15:57 ` [PATCH v2 06/11] mm: page_counter: constify page_counter_read() and page_counter_margin() Tal Zussman
2026-09-08 15:57 ` [PATCH v2 07/11] mm: memcontrol: constify the reclaim protection helpers Tal Zussman
2026-09-08 15:57 ` [PATCH v2 08/11] mm: memcontrol: constify the memcg and lruvec stat readers Tal Zussman
2026-09-08 15:57 ` [PATCH v2 09/11] mm: memcontrol: constify the swap accounting helpers Tal Zussman
2026-09-08 15:57 ` [PATCH v2 10/11] mm: memcontrol: constify mem_cgroup_swappiness() and mem_cgroup_get_max() Tal Zussman
2026-09-08 15:57 ` [PATCH v2 11/11] mm: memcontrol: constify the zswap and socket pressure helpers Tal Zussman
2026-09-16 13:34 ` Lorenzo Stoakes (ARM) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aqqaaDqTDahlZ7bR@gremlin \
    --to=ljs@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=baohua@kernel.org \
    --cc=baoquan.he@linux.dev \
    --cc=cgroups@vger.kernel.org \
    --cc=chrisl@kernel.org \
    --cc=david@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=kasong@tencent.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=nphamcs@gmail.com \
    --cc=qi.zheng@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=rppt@kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=shikemeng@huaweicloud.com \
    --cc=surenb@google.com \
    --cc=tz2294@columbia.edu \
    --cc=vbabka@kernel.org \
    --cc=weixugc@google.com \
    --cc=willy@infradead.org \
    --cc=youngjun.park@lge.com \
    --cc=yuanchu@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.