From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 851D4606A32C for ; Thu, 3 Dec 2026 14:22:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=CMq9JVmY; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nUDavRdK DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=yEU1lfl6KrHU049Hk+SPDs9T5gXGuA6VdF118whOtkw=; b=CMq9JVmYeMvqNXB5qWFO1AtO3l q4n0/dtgpu+sT7M5HgLQ32PRtUzZGr/9DOafCkcvyqIJVf61aCHD1QexILQ3wcACR+T9jv2TsdC9g 3lH0A5M97cqMKaMMOs+KKBKkkUA7yUkHlWDfqLYOQ7cWrT1+xqAcfVChHRW3414iyB5wffg7YaGGh koSvGFSWeVInTq6n+e82AS1G/1DXwThfQxb9zuKLTvToO36nBlH26V4HOsP57WVw0pR6g+yVWylV2 1wmMp7QIN9KB2+uyMLGB/ZkAhs8IfbZt/PcXqzcJSjZS/QwD/Ryfxy5/jDKAyTSbvYyadHroHzdvJ S/qwTFwg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ7he-0000000EvG7-2xjN; Thu, 03 Dec 2026 14:22:30 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ7hX-0000000EvEL-2v6i; Thu, 03 Dec 2026 14:22:23 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id E020D4369F; Thu, 3 Dec 2026 14:22:22 +0000 (UTC) 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-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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