Article View: linux.kernel.netdev
Article #26421Re: [PATCH slab/for-next v2 00/14] mm/slab: mandate SLAB_MAY_ACCOUNT for __GFP_ACCOUNT allocations to avoid wasting memory for s...
From: Harry Yoo
Date: Thu, 03 Dec 2026 14:22
Date: Thu, 03 Dec 2026 14:22
49 lines
12410 bytes
12410 bytes
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 <chris@chrisdown.name> (Assuming this is for all patches 1-14) > For patches 1, 13 and 14: > > Tested-by: Chris Down <chris@chrisdown.name> > > Chris Thanks a lot for reviewing and testing, Chris! -- Cheers, Harry / Hyeonggon
Technical Details
Message-ID:
<axF6WzWBZpoTnpXA@thinkstation>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376657-linux-kernel-netdev=dewy.ruReferences:
<20261125-memalloc-prof-dont-waste-slabobj-ext-metadata-v2-0-7c680f02a734@kernel.org> <awu1LR649K_1PMrJ@chrisdown.name>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376657-linux-kernel-netdev=dewy.ru From: harry@kernel.org (Harry Yoo) Newsgroups: linux.kernel.netdev 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 Date: Thu, 3 Dec 2026 14:22:20 +0000 Organization: Usenet Network Message-ID: <axF6WzWBZpoTnpXA@thinkstation> References: <20261125-memalloc-prof-dont-waste-slabobj-ext-metadata-v2-0-7c680f02a734@kernel.org> <awu1LR649K_1PMrJ@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="2512633"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:97pA89UojGIn6zjKtN1WY+Wdf6s= sha256:omyTyaqiGNO0raDq2U/BB0LAmoS6PtZwtBnJKwC40Hc= sha1:J3G5prVFdfVGSYJsKU0ZRLj5B9A= sha256:PfIdugiaPRO5o+b50yRmOTZI2yqFk/WkbeML17OMXwo= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 42B4E11797B; Thu, 3 Dec 2026 17:22:42 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.64 X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yXcBn95TzrOO; Thu, 3 Dec 2026 17:22:40 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-376657-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id D910C11790E; Thu, 3 Dec 2026 17:22:31 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 943A12DF42; Thu, 3 Dec 2026 14:22:25 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796307743; b=HsnZok8oBb048r2Xb8JsDG7jNOScsA/i9bObmxEw+dc/U4BEWm3hHiEcPiKj14WQXqwM xTH3eoAOH+Dui7KcrTIypuV5H48hOQOWjmWKCDv9+HArt9UnKtxtH+zARfEmgbBn1UOnI ShjHWSG1Fd4eUPYx88LP02sj9cytydwZUWo2BeNRpOnzoCgQAEkFvsG77/BZMIWnBDp8x U495eZ9l8mjsIefJYSm7P+Dz6JlTtxDwNdIvEH/zjR2a9Qj5iFWO84/wbn5qmyK1VXDAQ gVXacsGSeWwgIR/0diDuoKhPToBQOWuXQ5DPpHJ1syr+UNtWLR0sY7Kqx2Htq0puQAQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796307743; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=yEU1lfl6KrHU049Hk+SPDs9T5gXGuA6VdF118whOtkw=; b=by8v0j7a4rU83F+jrC8br9qufAnvpa8Qy4mQPygQHIkZhcF8ELGcdC5M8RyVOXwJwk6n KnBJcsowLYYNf7xk0Mw7yFjuMBimpgor8wM1FQfXdv1Sds7bXhcq19wj0yfPNL/fayx1V zJf/HO9PBuCwEQsbbIUMSoQde3WwSfL9HvmZyrDSmEefonvSh+4GtEEh6jYSHKJBhkGwT ojRCBPM9LOlB9Z0+22D8ffHHqMH3wTDgMbViEmdbTv7nyFPOGEcpWB9hl4EaOpT/zHZy1 vtLlfew8STH9icAUrQMNkxpYzyCe8BPEcEJ8dSXNzFE2KpxvPtfxqTO1gsGQI0DGa5w== X-ARC-Authentication-Results: i=2; 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=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CCAD3606A68B; Thu, 3 Dec 2026 14:22:23 +0000 (UTC) X-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 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-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== X-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== X-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 X-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) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F5521F00893; Thu, 3 Dec 2026 14:22:22 +0000 (UTC) X-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== X-Cc: Vlastimil Babka <vbabka@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, Suren Baghdasaryan <surenb@google.com>, Johannes Weiner <hannes@cmpxchg.org>, Michal Hocko <mhocko@kernel.org>, Shakeel Butt <shakeel.butt@linux.dev>, Roman Gushchin <roman.gushchin@linux.dev>, Hao Li <hao.li@linux.dev>, Christoph Lameter <cl@gentwo.org>, David Rientjes <rientjes@google.com>, Muchun Song <muchun.song@linux.dev>, Hao Ge <hao.ge@linux.dev>, Pedro Falcato <pfalcato@suse.de>, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, "Liam R. Howlett" <liam@infradead.org>, Alice Ryhl <aliceryhl@google.com>, Andrew Ballance <andrewjballance@gmail.com>, Matthew Wilcox <willy@infradead.org>, linux-fsdevel@vger.kernel.org, Alexander Viro <viro@zeniv.linux.org.uk>, Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>, "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Sebastian Andrzej Siewior <bigeasy@linutronix.de>, Jiayuan Chen <jiayuan.chen@linux.dev>, netdev@vger.kernel.org, Kees Cook <kees@kernel.org>, David Hildenbrand <david@kernel.org>, Lorenzo Stoakes <ljs@kernel.org>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Madhavan Srinivasan <maddy@linux.ibm.com>, Michael Ellerman <mpe@ellerman.id.au>, Nicholas Piggin <npiggin@gmail.com>, Robin Murphy <robin.murphy@arm.com>, "Joerg Roedel (AMD)" <joro@8bytes.org>, Amir Goldstein <amir73il@gmail.com>, Casey Schaufler <casey@schaufler-ca.com>, Paul Moore <paul@paul-moore.com>, James Morris <jmorris@namei.org>, "Serge E. Hallyn" <serge@hallyn.com>, linux-security-module@vger.kernel.org, Richard Weinberger <richard@nod.at>, Anton Ivanov <anton.ivanov@cambridgegreys.com>, Johannes Berg <johannes@sipsolutions.net>, Eric Dumazet <edumazet@kernel.org>, maple-tree@lists.infradead.org, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, Jason Xing <kerneljasonxing@gmail.com>, Willem de Bruijn <willemb@google.com>, Mina Almasry <almasrymina@google.com>, Björn Töpel <bjorn@kernel.org>, Mike Rapoport <rppt@kernel.org>, Michal Hocko <mhocko@suse.com>, Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>, Juri Lelli <juri.lelli@redhat.com>, Vincent Guittot <vincent.guittot@linaro.org>, Dietmar Eggemann <dietmar.eggemann@arm.com>, Steven Rostedt <rostedt@goodmis.org>, Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>, Valentin Schneider <vschneid@redhat.com>, K Prateek Nayak <kprateek.nayak@amd.com>, Anshuman Khandual <anshuman.khandual@arm.com>, linux-arm-kernel@lists.infradead.org, "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>, linuxppc-dev@lists.ozlabs.org, Niklas Schnelle <schnelle@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Gerald Schaefer <gerald.schaefer@linux.ibm.com>, Chen-Yu Tsai <wens@kernel.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Samuel Holland <samuel@sholland.org>, iommu@lists.linux.dev, linux-s390@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-um@lists.infradead.org, cgroups@vger.kernel.org X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <awu1LR649K_1PMrJ@chrisdown.name>