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 D7F73606A31C for ; Sun, 29 Nov 2026 05:16:41 +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=wk63pR9L; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.a=rsa-sha256 header.s=google header.b=IPDiQVdQ 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:Content-Type:MIME-Version: Message-ID:References:In-Reply-To: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=L2DZT68uAihI9/8StpIcHM/fogAanbAqNF1vpefgI/I=; b=wk63pR9L11tiWFKCgw0SyL/vtA dR+XaNKYp5MxrHs+NdH9zwcEdhNkNP9TQq+ZjGDtMzfRcdR/dGTJXoK/RtOsbJAxlRLAO8y7iGeNw AT11qw1ko1YXQqDvuwASaMlF/SWr2vFIyAz7LfrJP4CWLMunvK4RfFcQCPXzeUfm9jTAa/PMsbFuD JlAoNoz495pqo3CP/5CRw1g3Ggl7igXeaYti8j1hjdowW9/XQHowfF89uNTB2ccAkli69PFSE47M4 zcUNqLjE0cvaH8y33sci8lx04J0BOHPn73P5AYoUIEqSZwdT95PE/Xb7Qj+q9FoBm5xCjxcxLX1xc JbqOK9Gg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXXHD-00000001ahI-3FoL; Sun, 29 Nov 2026 05:16:39 +0000 Received: from mail-yw1-x1135.google.com ([2607:f8b0:4864:20::1135]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXXHA-00000001agF-2AQ3 for linux-um@lists.infradead.org; Sun, 29 Nov 2026 05:16:38 +0000 Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-8b4fb5d96b3so141950867b3.1 for ; Sat, 28 Nov 2026 21:16:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; t=1795929395; x=1796534195; darn=lists.infradead.org; h=user-agent:content-disposition:content-type:mime-version:message-id :references:in-reply-to:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=L2DZT68uAihI9/8StpIcHM/fogAanbAqNF1vpefgI/I=; b=IPDiQVdQFYNGqMHTtqcCtazSLrNFmt2woL/ChMAZu2dPvPySnl6rhVWeXdJxTJl9kp 46U/LJ2WhMsXH+pl817QEVkRvepGdbPkDLpZpxLZILJQBIMP2V5R8BwAbOGeEAtl7H/M A1X378BZFyXYkciZ1+U5GwXvIX5BPxrKw0EIw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795929395; x=1796534195; h=user-agent:content-disposition:content-type:mime-version:message-id :references:in-reply-to:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=L2DZT68uAihI9/8StpIcHM/fogAanbAqNF1vpefgI/I=; b=PepCBfniuFM/sR8mzNjiPF/rZ8Vv962SjPcigekSasLRcqFgp9FvWC2Emd6T+US4xK BfZwA5OdOmxbirEfR62ELlaTiiIJ69Hip+QkRBqH+wR2bccX6RpP7fjTnYls0iMzMJgh hYj8/dm54CSMo2SNTZ5exfJHFsURaOqYJ8HZN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AW+dIVUo5PIwo4HK hgfsIiz4b3FHLiMz4gARZH7m3AJ2qTbNHnqN4K334aXC2CyG8kE4W6XeM3Px+MSdaBTKof6F8mW TAG2nn2FG/uz3hhncFDqY4ggiqT/Kcke0nDcVF+cKxOTcEbJ6xC7sEHhmhkykWgVXOOQC75f9VB dvZajoZdsiV/fQO3BWwLDI= X-Received: by 2002:a05:690c:9986:b0:8b4:c8f1:666f with SMTP id 00721157ae682-8b52047a8a1mr106267807b3.17.1795929395170; Sat, 28 Nov 2026 21:16:35 -0800 (PST) Received: from [172.20.0.2] (c-73-207-185-9.hsd1.ga.comcast.net. [73.207.185.9]) by smtp.gmail.com with ESMTPSA id 00721157ae682-8b5203325adsm114089737b3.37.2026.11.28.21.16.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Nov 2026 21:16:33 -0800 (PST) Date: Sat, 28 Nov 2026 21:16:29 -0800 From: Chris Down To: "Harry Yoo (Meta)" 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 In-Reply-To: <20261125-memalloc-prof-dont-waste-slabobj-ext-metadata-v2-0-7c680f02a734@kernel.org> References: <20261125-memalloc-prof-dont-waste-slabobj-ext-metadata-v2-0-7c680f02a734@kernel.org> Message-ID: X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/2.4.3 (cc9e3943) (2026-10-09) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261128_211636_562074_45F83054 X-CRM114-Status: GOOD ( 15.35 ) X-Spam-Score: -2.1 (--) 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=-12.4 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,USER_AGENT_SANE_1 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 Hi Harry, 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. 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. 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 For patches 1, 13 and 14: Tested-by: Chris Down Chris