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 B862F2D63E5 for ; Thu, 16 Jul 2026 02:34:56 +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=1784169297; cv=none; b=KeivM9g2tHbcB/pRrzzNt+rQ17Q+wAszlN/POuTyOilLvoBPy/Nqs0QXEGzRZLID0tKxD5ILowL7b/JKoNCuB0WqYvS/u4gu7z8MM11RmvyB8jm918UwGmMGnQzZz8U9ZIfFJm8m/eHVQmgwkvzDfN6auBe+RJF9hvizswOcnSM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784169297; c=relaxed/simple; bh=AplusJcTTIVCbe9CwBy+/wj8nodbLNnKMROAKeKy5HA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Y1u5miFC2//fGz5By0wFv28PtnlvZWdl2uNiHNmkbNjhIvayQQV4Ms9A0Gq/D8ojwml5zb18c4KxE+Sxsh3shqWIIk7eU2dI8Qs8cTfL6kCbbS0eBrumhWMrH+CqB/7wew1QOoBGllxQha/pIwluOInlVp8ZxFs3fGMdDQl2kUE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LUeHue2T; 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="LUeHue2T" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 425301F000E9; Thu, 16 Jul 2026 02:34:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1784169296; bh=AplusJcTTIVCbe9CwBy+/wj8nodbLNnKMROAKeKy5HA=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=LUeHue2TdDv8VmLTTI4CmXrR4tw7d1yV0CCDTQ1YH/nnkTBxIVCnHwMyVpG+OjkLA qsVzAQ3Rd0EmQTeZFkC8qqySTrgniv3ArGNtzk5yUB2FlTRShycyeQ3iwhHocnU/Am v3LdU3ypT0a/DtvhjyDQ+KeZJYHfdxJOLcazRd9FYHw9Qkh4iRUcFaaxIU3pPwR6CY HlrPQYK5Jd34WuG1WueooMPV4pxV1wY4HewRrmalRbaOQBoU54vlBKFU+sjJ/1+IfC V0bugSAltncCFUO4mScPCT3WDCyfzifjPgpLTWVzE9S7SGsdYbRAzdiAu8+G0H0Zjq y5Ffum7bJc+Iw== Message-ID: <3dee7d67-c8e8-49e1-83f9-54aeeb699442@kernel.org> Date: Thu, 16 Jul 2026 11:34:50 +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: Suren Baghdasaryan Cc: "Vlastimil Babka (SUSE)" , 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> <34af7126-0a19-4da7-a3dc-4e6e0ae01ca7@kernel.org> Content-Language: en-US From: Harry Yoo In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------lOxC8w6OqcKZOEPosUCaHYgt" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------lOxC8w6OqcKZOEPosUCaHYgt Content-Type: multipart/mixed; boundary="------------p0ORmjYoU6jt0zrPNhwgnPpM"; protected-headers="v1" From: Harry Yoo To: Suren Baghdasaryan Cc: "Vlastimil Babka (SUSE)" , 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: <3dee7d67-c8e8-49e1-83f9-54aeeb699442@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> <34af7126-0a19-4da7-a3dc-4e6e0ae01ca7@kernel.org> In-Reply-To: --------------p0ORmjYoU6jt0zrPNhwgnPpM Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 7/14/26 11:37 PM, Suren Baghdasaryan wrote: > On Mon, Jul 13, 2026 at 9:28=E2=80=AFAM Harry Yoo wr= ote: >> 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= when >>>>> memalloc profiling is permanently disabled. For example, to skip th= e >>>>> creation of KMALLOC_NO_OBJ_EXT caches at boot time, mem_profiling m= ust >>>>> be set to "never", "0" w/ debugging on, or have been shutdown so th= at >>>>> it can no longer be enabled. >>>>> >>>>> Introduce mem_alloc_profiling_permanently_disabled() for this purpo= se. >>>> >>>> nit: I would call it mem_alloc_profiling_supported() but this name w= ould do. >>> >>> I wouldn't like that name, because _supported to me sounds like those= >>> CONFIG_ARCH_SUPPORTS... things and not something that was just disabl= ed. >> >> 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 eit= her, >> >> Hehe, in terms of 'the meaning is obvious without reading the code', >> it's not very straightforward... >> >>> naming is hard. >> >> Agreed! >=20 > I'll let you pick one :) Haha, I'm honored! ;) --=20 Cheers, Harry / Hyeonggon --------------p0ORmjYoU6jt0zrPNhwgnPpM-- --------------lOxC8w6OqcKZOEPosUCaHYgt Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQQ1ub6gR5ogjaKRmOGXBN6rc5S1gUCalhDSgAKCRCGXBN6rc5S 1hcnAQD3nYQVAKHZ3hfmxXfyxI1L/pYM8ir0KVNZM9xSNtSPWQEAgwc55+yK9mth 1O9U56aSWA7yIYwDafELZ7j9tOAzpwM= =KQXf -----END PGP SIGNATURE----- --------------lOxC8w6OqcKZOEPosUCaHYgt--