From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 475F0242D88 for ; Sun, 28 Jun 2026 08:36:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782635774; cv=none; b=s8l3oGt3WqEAjlrXuvHlk5g9XR16fGW3gkEfpe+mSsMfD0z5zNpWz4smB1QvDu69ce9FamInAQOPHYCQ/szClpgA3bJ1gKAIPLsz/2E7ScWn1gZtQfmmxmxAyHiTr7D0j0isBMcyPOYzKLCGorpFeiuLfHT5Z2SqZMbLNsCW3Uc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782635774; c=relaxed/simple; bh=nfvn8w/+2N4QOEp9amrUt+70kbimej+Gnuwa2CwvU4I=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=eqsptKrN9vzT+2nOftIPL6gTMHwuDFrkB7JnSiEBzHtTs9c6vW683GGFwf07YzgmpHAReyhxxdBHP8WE2cADNFDmKtz3MbQQ6zl7oUdyYyc7reww56p89FuvPnmAqL3n2Ls9x11BooMnP9ifPBqGbXS61yQv0w+Uwrt1/lNNR2I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fmtQHkCR; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fmtQHkCR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 601B11F000E9; Sun, 28 Jun 2026 08:36:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1782635772; bh=nfvn8w/+2N4QOEp9amrUt+70kbimej+Gnuwa2CwvU4I=; h=Date:From:Subject:To:Cc:References:In-Reply-To; b=fmtQHkCRavnlx+8nWKlfhm97zrd3InihC0KY8/gqPbJl3lHLZA+hdoNzw9xnLUGOd oFnGyl8PBncJtgyQjOmj6KHasbLjCKn3k3d2IgGGLS+dpwv4T9VpXixI7rAIFJC3/F VvUvIhwrZnfa7RIjJUsjGbV9jHdCeLjlrekt9EoMe+PJhvG1udoEMXIODkPTXh2+YF 7SsgJn3/dnEinZxvCsUtoPksc6CafeFUzkoG8ZKvv9T4mxWRGuFYTc2dsv6YTXYSeI tD9KesbSim4SukZ0xGvxVi7t/299g41XUS815QCkJYXwwC9OViglrPtyaHrDnSYa2q UvP7qbAvvtaoA== Message-ID: <0a5bd822-5076-4dc5-9c99-8b4a36d119a2@kernel.org> Date: Sun, 28 Jun 2026 17:36:05 +0900 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Harry Yoo Subject: Re: [PATCH] mm/slub: serve slabobj_ext array from a strictly larger kmalloc cache To: "Vlastimil Babka (SUSE)" , Shakeel Butt Cc: Andrew Morton , Roman Gushchin , Hao Li , Christoph Lameter , David Rientjes , Suren Baghdasaryan , Usama Arif , Meta kernel team , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Danielle Costantino References: <20260625230029.703750-1-shakeel.butt@linux.dev> <62453403-954c-4cf1-8924-6d38184b0810@kernel.org> <09267187-6c85-438f-8791-4cce8d07892a@kernel.org> <0925f783-1506-4a20-ab9a-3130c2f07ed3@kernel.org> Content-Language: en-US In-Reply-To: <0925f783-1506-4a20-ab9a-3130c2f07ed3@kernel.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------3GfxXd63I9ObqmVAjGuD5Xr0" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------3GfxXd63I9ObqmVAjGuD5Xr0 Content-Type: multipart/mixed; boundary="------------wKfn6SOhJ4zncBuTwBK74Tnp"; protected-headers="v1" From: Harry Yoo To: "Vlastimil Babka (SUSE)" , Shakeel Butt Cc: Andrew Morton , Roman Gushchin , Hao Li , Christoph Lameter , David Rientjes , Suren Baghdasaryan , Usama Arif , Meta kernel team , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Danielle Costantino Message-ID: <0a5bd822-5076-4dc5-9c99-8b4a36d119a2@kernel.org> Subject: Re: [PATCH] mm/slub: serve slabobj_ext array from a strictly larger kmalloc cache References: <20260625230029.703750-1-shakeel.butt@linux.dev> <62453403-954c-4cf1-8924-6d38184b0810@kernel.org> <09267187-6c85-438f-8791-4cce8d07892a@kernel.org> <0925f783-1506-4a20-ab9a-3130c2f07ed3@kernel.org> In-Reply-To: <0925f783-1506-4a20-ab9a-3130c2f07ed3@kernel.org> --------------wKfn6SOhJ4zncBuTwBK74Tnp Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 6/28/26 5:10 PM, Harry Yoo wrote: >=20 >=20 > On 6/27/26 2:11 AM, Vlastimil Babka (SUSE) wrote: >> Minimally I'd now want to only do that size bumping when allocation >> profiling is enabled. Ideally that means both configured in and not bo= oted >> with "never". >> >> We probably should have done that already in 280ea9c3154b2. >=20 > I think we did already. >=20 > obj_exts allocation triggered by memcg has __GFP_ACCOUNT, kmalloc type > is KMALLOC_CGROUP, and so is_kmalloc_normal() should return false? >=20 > Perhaps a comment above !is_kmalloc_normal() check would be nice. >=20 >> Because AFAIU >> memcg-only obj_exts array don't have this issue >> (or maybe they do have the > [1] issue? Harry?). >=20 > memcg-only obj_exts array doesn't have this issue and [1]. >> Because obj_exts are not accounted and so we can't allocate obj_exts > from KMALLOC_CGROUP. Oh god, I am confused again! Commit 8dafa9f5900c says it might have this issue. However is_kmalloc_normal(s) =3D=3D true detects that it might hav= e the problem when either 1) memory allocation profiling is enabled, or 2) SLUB_TINY w/ __GFP_RECLAIMABLE|__GFP_ACCOUNT allocates accounted slab objects from KMALLOC_NORMAL. --=20 Cheers, Harry / Hyeonggon --------------wKfn6SOhJ4zncBuTwBK74Tnp-- --------------3GfxXd63I9ObqmVAjGuD5Xr0 Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQQ1ub6gR5ogjaKRmOGXBN6rc5S1gUCakDc9QAKCRCGXBN6rc5S 1jIeAP4qtq+NisEYFpv03iiMzdPr6nve/wHx8YPlWmcM0mTcaQEAnILwYYfktP41 1GWR1qw3TzgjwtzfndemUjSIV6ZG1ws= =BhXu -----END PGP SIGNATURE----- --------------3GfxXd63I9ObqmVAjGuD5Xr0--