From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796307743; b=gQJ7dolgFxkNY/D4pc/D/vbbalfwU7S0pN0VqX/YWkFSvih87dysoC+IJZjo1Enp+RV5 1rF8y3qkmEYlimOv6NQIQCKR9Z4e47lc0tEGedAcfSsxC8TKHldKqhGI6Jhwi9nuV5b65 aUaB6gq50rjvMYqPo70S6ugs9zfH6jthqB5VJOM4rp2tdXi8DLsQa9KQbToQ5MPjieB2F PS1t3bE+ZxQISCYRcwMw/ayrLIxmkOL4E/haUoD67yyvGR+3dDcp7no/MupYA8zBO+2kd w6fU/4+nu/rgt5ziyfx7HMAnv4cMerWeH4akgDQgxXrMVUF5qbfbC85MXAx8FoWqHlA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796307743; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=yEU1lfl6KrHU049Hk+SPDs9T5gXGuA6VdF118whOtkw=; b=Ehg8PcGLdLV9AdBzExzdIozcyW101j2WwYoyU50PRspJEv819e9MJRAkZkbJ8ar8kF8F laiMgpk5uqyY1YkBokovxGeRbZEt6dbHca5mkWFNf1f5U9i0rFaKmsC78WV94Q4xZh6pY F6GdTe0Ie4mO+izM7+tpORonjjl/QFTHKKltk2+gySjunmAX9m7fjy0SypdpYARErlWDY eZqbKbzVZSTEBWhBURLFnrILvmfXSgWqpktDH9DrQAq7eKr1v2Po9Dyz7chM2xpYXyqkT w2h9bVpFLg0O2yVJ8tVnTHlgLPY+1jvYnCyUN8g7CxqXAZDWhsy72Ws1si5hm0ChxlQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nUDavRdK; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E853E606A32C; Thu, 3 Dec 2026 14:22:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nUDavRdK Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F5521F00893; Thu, 3 Dec 2026 14:22:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796307742; bh=yEU1lfl6KrHU049Hk+SPDs9T5gXGuA6VdF118whOtkw=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=nUDavRdKohh20T9ylgZbeJcsnbDm62XSOUv+i0AJNYSzodj894BgW+3l+vmzuBhf9 7ddJnzxAQzHdPwzP4zT5zjcxnHjiQpe63l4/b4hP8do6I3B2mjYEOUvfrZnRFDkeLm mJUlOHcyrzaNFZldBqBU3lloxQGHy9/Jy9vV0FobbgzjEHisSuuzbTMcDBcAqwrMvN fkgFH0mUma34BeNPktSwjm1HR/e5DJWrObdgJyNYfwbGmCBGhLkYbp6eN76i4lRDIC kjWJrVJXsrN7baYhynZLxx/Dgjq+J+mfRZ4D0uNqtf2xvKrzMCbgjeTqq1q1kwtGfT KPbst79UBWB7Q== Date: Thu, 3 Dec 2026 14:22:20 +0000 From: Harry Yoo To: Chris Down Cc: Vlastimil Babka , Andrew Morton , Suren Baghdasaryan , Johannes Weiner , Michal Hocko , Shakeel Butt , Roman Gushchin , Hao Li , Christoph Lameter , David Rientjes , Muchun Song , Hao Ge , Pedro Falcato , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, "Liam R. Howlett" , Alice Ryhl , Andrew Ballance , Matthew Wilcox , linux-fsdevel@vger.kernel.org, Alexander Viro , Christian Brauner , Jan Kara , "David S. Miller" , Jakub Kicinski , Sebastian Andrzej Siewior , Jiayuan Chen , netdev@vger.kernel.org, Kees Cook , David Hildenbrand , Lorenzo Stoakes , Catalin Marinas , Will Deacon , Mark Rutland , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Robin Murphy , "Joerg Roedel (AMD)" , Amir Goldstein , Casey Schaufler , Paul Moore , James Morris , "Serge E. Hallyn" , linux-security-module@vger.kernel.org, Richard Weinberger , Anton Ivanov , Johannes Berg , Eric Dumazet , maple-tree@lists.infradead.org, Paolo Abeni , Simon Horman , Jason Xing , Willem de Bruijn , Mina Almasry , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= , Mike Rapoport , Michal Hocko , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , K Prateek Nayak , Anshuman Khandual , linux-arm-kernel@lists.infradead.org, "Christophe Leroy (CS GROUP)" , linuxppc-dev@lists.ozlabs.org, Niklas Schnelle , Matthew Rosato , Gerald Schaefer , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , iommu@lists.linux.dev, linux-s390@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-um@lists.infradead.org, cgroups@vger.kernel.org Subject: Re: [PATCH slab/for-next v2 00/14] mm/slab: mandate SLAB_MAY_ACCOUNT for __GFP_ACCOUNT allocations to avoid wasting memory for slab metadata Message-ID: References: <20261125-memalloc-prof-dont-waste-slabobj-ext-metadata-v2-0-7c680f02a734@kernel.org> X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Sat, Nov 28, 2026 at 09:16:29PM -0800, Chris Down wrote: > Hi Harry, Hi Chris, > Harry Yoo (Meta) writes: > >While I tried to make sure the sweep is exhaustive, there can be a > >missing conversion. However that is not a correctness problem: > >the objects are just no longer charged to memcgs. Patch 13 adds > >VM_WARN_ON_ONCE in __memcg_slab_post_alloc_hook() to catch such a > >missing conversion. > > This series looks good, thank you. But in terms of documentation, I > think we are a little bit light on where the SLAB_MAY_ACCOUNT > requirement is written down. Right now it's only written next to > SLAB_MAY_ACCOUNT in slab.h, but with that it's likely that people > adding __GFP_ACCOUNT won't see it. Good point! > Could you also perhaps put it in > the __GFP_ACCOUNT comment in gfp_types.h and in > Documentation/core-api/memory-allocation.rst, which both still describe > __GFP_ACCOUNT as enough on its own? The comment above kmem_cache_charge() > also still says that only KMALLOC_NORMAL objects are skipped, so that > could be fixed in patch 14 as well. Ack, I'll adjust the docs part. > I wouldn't block on that, but it would be good to improve this. I've > looked through these and am happy with them, and have tested where > possible so you can add: > > Reviewed-by: Chris Down (Assuming this is for all patches 1-14) > For patches 1, 13 and 14: > > Tested-by: Chris Down > > Chris Thanks a lot for reviewing and testing, Chris! -- Cheers, Harry / Hyeonggon