All of lore.kernel.org
 help / color / mirror / Atom feed
From: Muchun Song <muchun.song@linux.dev>
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>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Hildenbrand <david@kernel.org>,
	Lorenzo Stoakes <ljs@kernel.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Kairui Song <kasong@tencent.com>, Qi Zheng <qi.zheng@linux.dev>,
	Barry Song <baohua@kernel.org>,
	Axel Rasmussen <axelrasmussen@google.com>,
	Yuanchu Xie <yuanchu@google.com>, Wei Xu <weixugc@google.com>,
	Baoquan He <baoquan.he@linux.dev>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	Chris Li <chrisl@kernel.org>,
	Kemeng Shi <shikemeng@huaweicloud.com>,
	Nhat Pham <nphamcs@gmail.com>,
	Youngjun Park <youngjun.park@lge.com>,
	"Matthew Wilcox (Oracle)" <willy@infradead.org>,
	cgroups@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 03/11] mm: memcontrol: constify the lruvec helpers
Date: Wed, 16 Sep 2026 10:30:55 +0800	[thread overview]
Message-ID: <3509BF39-2110-4705-B7D1-D333AF54BF0F@linux.dev> (raw)
In-Reply-To: <20260915-folio_memcg-const-v3-3-c239a6010b58@columbia.edu>



> On Sep 16, 2026, at 07:20, Tal Zussman <tz2294@columbia.edu> wrote:
> 
> The lruvec lookup helpers only read from the memcg, folio, or lruvec
> they are given. Constify them, along with lruvec_pgdat() and the folio
> argument of the folio_lruvec_relock_irq() helpers. mem_cgroup_lruvec()
> may update lruvec->pgdat for a newly onlined node, but that lives in
> the per-node structure, not the memcg. Similarly, lruvec_pgdat() still
> returns a non-const pgdat and does not use container_of_const().
> 
> Use container_of_const() in lruvec_memcg() and
> mem_cgroup_get_zone_lru_size(), so the const isn't silently cast away.
> 
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>

Reviewed-by: Muchun Song <muchun.song@linux.dev>

Thanks


  reply	other threads:[~2026-09-16  2:31 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 23:20 [PATCH v3 00/11] mm: memcontrol: constify the read side of the memcg API Tal Zussman
2026-09-15 23:20 ` [PATCH v3 01/11] mm: memcontrol: take a const folio in folio_memcg() and friends Tal Zussman
2026-09-16  2:27   ` Muchun Song
2026-09-15 23:20 ` [PATCH v3 02/11] mm: memcontrol: constify obj_cgroup_memcg() " Tal Zussman
2026-09-16  2:28   ` Muchun Song
2026-09-15 23:20 ` [PATCH v3 03/11] mm: memcontrol: constify the lruvec helpers Tal Zussman
2026-09-16  2:30   ` Muchun Song [this message]
2026-09-15 23:20 ` [PATCH v3 04/11] mm/page_io: take a const folio in bio_associate_blkg_from_folio() Tal Zussman
2026-09-16  2:31   ` Muchun Song
2026-09-15 23:20 ` [PATCH v3 05/11] mm: memcontrol: constify the mem_cgroup accessors Tal Zussman
2026-09-16  2:32   ` Muchun Song
2026-09-15 23:20 ` [PATCH v3 06/11] mm: page_counter: constify page_counter_read() and page_counter_margin() Tal Zussman
2026-09-16  2:33   ` Muchun Song
2026-09-15 23:20 ` [PATCH v3 07/11] mm: memcontrol: constify the reclaim protection helpers Tal Zussman
2026-09-16  2:34   ` Muchun Song
2026-09-15 23:20 ` [PATCH v3 08/11] mm: memcontrol: constify the memcg and lruvec stat readers Tal Zussman
2026-09-16  2:35   ` Muchun Song
2026-09-15 23:20 ` [PATCH v3 09/11] mm: memcontrol: constify the swap accounting helpers Tal Zussman
2026-09-16  2:36   ` Muchun Song
2026-09-15 23:20 ` [PATCH v3 10/11] mm: memcontrol: constify mem_cgroup_swappiness() and mem_cgroup_get_max() Tal Zussman
2026-09-16  2:36   ` Muchun Song
2026-09-15 23:20 ` [PATCH v3 11/11] mm: memcontrol: constify the zswap and socket pressure helpers Tal Zussman
2026-09-16  2:37   ` Muchun Song
2026-09-16  3:53 ` [PATCH v3 00/11] mm: memcontrol: constify the read side of the memcg API Shakeel Butt
2026-09-16 17:28   ` Lorenzo Stoakes (ARM)
2026-09-17  4:08     ` Tal Zussman
2026-09-16 21:54 ` Andrew Morton

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=3509BF39-2110-4705-B7D1-D333AF54BF0F@linux.dev \
    --to=muchun.song@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=baohua@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --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=ljs@kernel.org \
    --cc=mhocko@kernel.org \
    --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.