From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta0.migadu.com (out-203.mta0.migadu.com [91.218.175.203]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 447193A5421 for ; Wed, 16 Sep 2026 02:35:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.203 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789526157; cv=none; b=POKqXVTGCtITkg2FWdQv/xaX6eSh6LVbzX0z0D1f8956dm1hQ+A3Crv0P9d2k1ESFmEBAOqlx1BKuWrBVzfR6vS3ch4pRSgBdEVEQA/G7KQV82HjIsC4BYKPnxvrR5CcikE3ffQAhxHWOmyNraFnn6jNBcR5by9hIbM5M3PtxY4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789526157; c=relaxed/simple; bh=TvWzW1LVwKvEvLrmGXalaJM+zsGwELVQfJ+2EaBSRlg=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=aEsPOmQMGs8Sq0po6KCiFgNKP0MQNHV0/qlNilyPZQjydzZCB+ASHleOaGFXy1P4AoCPipCEU82CcGXBxYV8fXjaUIhY+MnBKBDsmAcpnxd3jm8gKVY0NnC09jGKG5DwvHo7useK7vskShplwMJmEY9QK3j+ZA8UPCsoeqKxGwg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=KTPyn9x4; arc=none smtp.client-ip=91.218.175.203 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="KTPyn9x4" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=TvWzW1LVwKvEvLrmGXalaJM+zsGwELVQfJ+2EaBSRlg=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1789526146; v=1; x=1790130946; b=KTPyn9x4PqhGz0UGzuaeiGFeeaWT0YM3OsRPCLSrXrIjZwAWcV/3kbgZn8g0xvAoR9EgJLmt EVD89zcG8Pu2iL1ftSs1ceoq+5UaG/pyiuKwiknns3FRqnhu3t9ST3vCBMhcscG+e8r5pKkDKFu aqCzQ0AZKmF6Rch4ktgAJqrs= X-Envelope-To: linux-kernel@vger.kernel.org Received: by mta10.migadu.com with ESMTPS id e4a3c3e71545321b; Wed, 16 Sep 2026 02:35:46 +0000 X-Mizu-Trace-ID: e4a3c3e71545321b X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset=us-ascii Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.700.51.1.1\)) Subject: Re: [PATCH v3 08/11] mm: memcontrol: constify the memcg and lruvec stat readers From: Muchun Song In-Reply-To: <20260915-folio_memcg-const-v3-8-c239a6010b58@columbia.edu> Date: Wed, 16 Sep 2026 10:35:24 +0800 Cc: Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Kairui Song , Qi Zheng , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , Baoquan He , Baolin Wang , Chris Li , Kemeng Shi , Nhat Pham , Youngjun Park , "Matthew Wilcox (Oracle)" , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: <41FB90C4-30C2-44BB-9719-43CB9F70CF05@linux.dev> References: <20260915-folio_memcg-const-v3-0-c239a6010b58@columbia.edu> <20260915-folio_memcg-const-v3-8-c239a6010b58@columbia.edu> To: Tal Zussman X-Mailer: Apple Mail (2.3864.700.51.1.1) > On Sep 16, 2026, at 07:20, Tal Zussman wrote: > > The memcg_page_state(), memcg_events(), and lruvec_page_state() > families only read counters. Constify them. > > Use container_of_const() in the lruvec_page_state() family while at it, > so the const isn't silently cast away. > > Signed-off-by: Tal Zussman Acked-by: Muchun Song Thanks.