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 B59C8406804 for ; Mon, 13 Jul 2026 16:28:18 +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=1783960099; cv=none; b=XFR0MDt7jPwtmv/pPnpeeOQMf+Iq/lmIA2bIC3jHRvNQHcKnVTSjefyhkpWYN/ICzlSc6ssAm7HFRhMbKz8MtkfVjfaQWcPo3B4mqZ95j/gWoi28ic2l+Sw/TVB+UUUIM+GG8D4ZMMuV22ZqBano6ILqK50U+sD780Ujcl9EVj0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783960099; c=relaxed/simple; bh=Bzru6MD6tMP5Zrs5sR9HSGqg0+r+/7ONX3ynlP+FaEw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=fUk+Oizh314OzdUybAVMsu2zt6ypNUSYqKJjU7fwD8gkoPwL5vOiJZdhtq0kOttMr+xbBSZJ+cNNfZ2k3FhZT8F36ADd/m/eJjXTlQxuhZ7EqPMQmLEJ+3NBS9Pbm5KHh4GnU4fIyevkNoJ2pT6HSPNgdj84JmAyaykBDij4WD4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JGZH6yji; 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="JGZH6yji" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C61AA1F000E9; Mon, 13 Jul 2026 16:28:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783960098; bh=Bzru6MD6tMP5Zrs5sR9HSGqg0+r+/7ONX3ynlP+FaEw=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=JGZH6yjiLr8UV0qa+IbknDrUCBr5K3XXUxhsUmjRRleb9MIQxzD0KZZ0kK6qCvwLB g/+YMq6rxwFrLH0O4wCPZqqoOkBTCOOv6/i+PawUBS2vRLTfTfIWQM5gZxXEWDhF0y Xk7JQ3ghv/q4pekTY2PAz1ULG6bF2rXKnm5A3ZDbVSkOUSiO7oGKHHvPfea+mDcbEn IfbxP/1y01/1i+IFnbvG3lDOQxkFw+KDQHMkH1azy3VRCjMNEf/AdfwKQlRJI6Wcme z8FYgnZbFQJQ3n9IXyUBjyHtd2q6D4JdFX/k9+As3n109jNabREf3ofTHjXLkfdM5n tKs11qf1UugcA== Message-ID: <34af7126-0a19-4da7-a3dc-4e6e0ae01ca7@kernel.org> Date: Tue, 14 Jul 2026 01:28:09 +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 Subject: Re: [PATCH slab/for-next-fixes v3 3/4] lib/alloc_tag: introduce mem_alloc_profiling_permanently_disabled() To: "Vlastimil Babka (SUSE)" , Suren Baghdasaryan Cc: Andrew Morton , Hao Li , Christoph Lameter , David Rientjes , Roman Gushchin , "Liam R. Howlett" , Hao Ge , Kees Cook , Pedro Falcato , Shakeel Butt , Danielle Constantino , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20260713-kmalloc-no-objext-v3-0-47c7bd138de7@kernel.org> <20260713-kmalloc-no-objext-v3-3-47c7bd138de7@kernel.org> Content-Language: en-US From: Harry Yoo In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------yM11ege9wS0qxduGjNyxQyUV" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------yM11ege9wS0qxduGjNyxQyUV Content-Type: multipart/mixed; boundary="------------QPtYmvYQljrwPUH3mcfP0W4m"; protected-headers="v1" From: Harry Yoo To: "Vlastimil Babka (SUSE)" , Suren Baghdasaryan Cc: Andrew Morton , Hao Li , Christoph Lameter , David Rientjes , Roman Gushchin , "Liam R. Howlett" , Hao Ge , Kees Cook , Pedro Falcato , Shakeel Butt , Danielle Constantino , linux-mm@kvack.org, linux-kernel@vger.kernel.org Message-ID: <34af7126-0a19-4da7-a3dc-4e6e0ae01ca7@kernel.org> Subject: Re: [PATCH slab/for-next-fixes v3 3/4] lib/alloc_tag: introduce mem_alloc_profiling_permanently_disabled() References: <20260713-kmalloc-no-objext-v3-0-47c7bd138de7@kernel.org> <20260713-kmalloc-no-objext-v3-3-47c7bd138de7@kernel.org> In-Reply-To: --------------QPtYmvYQljrwPUH3mcfP0W4m Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 7/14/26 1:15 AM, Vlastimil Babka (SUSE) wrote: > On 7/13/26 17:43, Suren Baghdasaryan wrote: >> On Mon, Jul 13, 2026 at 7:29=E2=80=AFAM Harry Yoo (Oracle) wrote: >>> >>> mem_alloc_profiling_enabled() tells whether memalloc profiling is >>> currently enabled. However, even when this function returns false, >>> it can be enabled later. >>> >>> However, this is not enough. Some optimizations can be applied only w= hen >>> memalloc profiling is permanently disabled. For example, to skip the >>> creation of KMALLOC_NO_OBJ_EXT caches at boot time, mem_profiling mus= t >>> be set to "never", "0" w/ debugging on, or have been shutdown so that= >>> it can no longer be enabled. >>> >>> Introduce mem_alloc_profiling_permanently_disabled() for this purpose= =2E >> >> nit: I would call it mem_alloc_profiling_supported() but this name wou= ld do. >=20 > I wouldn't like that name, because _supported to me sounds like those > CONFIG_ARCH_SUPPORTS... things and not something that was just disabled= =2E Agreed! Actually, last year I wasn't sure what "_support" in mem_profiling_support means and had to look at the code while fixing a bug [1]. This year I forgot what it meant and had to look at the code again :) > I suggested mem_alloc_profiling_unavailable(), but it's not ideal eithe= r, Hehe, in terms of 'the meaning is obvious without reading the code', it's not very straightforward... > naming is hard. Agreed! [1] https://lore.kernel.org/linux-mm/20250624072513.84219-1-harry.yoo@oracle.= com --=20 Cheers, Harry / Hyeonggon --------------QPtYmvYQljrwPUH3mcfP0W4m-- --------------yM11ege9wS0qxduGjNyxQyUV Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQQ1ub6gR5ogjaKRmOGXBN6rc5S1gUCalUSGgAKCRCGXBN6rc5S 1ixCAP9FE8TE8I5tHLN3kWxg6Nty1cqIAwla2PwkZKSDiqRyUgD/Yf2lKeJObRfT RQjKVDRu4qpO1fv4/JCjlt89DtQdCwA= =jIHI -----END PGP SIGNATURE----- --------------yM11ege9wS0qxduGjNyxQyUV--