From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6826CC0015E for ; Fri, 11 Aug 2023 06:54:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E365F6B0071; Fri, 11 Aug 2023 02:54:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DE52C6B0072; Fri, 11 Aug 2023 02:54:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CD4266B0074; Fri, 11 Aug 2023 02:54:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id C09256B0071 for ; Fri, 11 Aug 2023 02:54:55 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 7ACA41A0EF5 for ; Fri, 11 Aug 2023 06:54:55 +0000 (UTC) X-FDA: 81110911350.22.3895A7D Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by imf23.hostedemail.com (Postfix) with ESMTP id 3A3A6140004 for ; Fri, 11 Aug 2023 06:54:52 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b="Mn/Dgp2I"; spf=pass (imf23.hostedemail.com: domain of quic_bibekkum@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_bibekkum@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1691736892; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=LRIRVABkXAVxZmaAaZfUWt+U4vRxzVNLCPyv4TTJSmA=; b=JZH+AgeUDkJvrCEstYlw/wumhh4UNBf/3tE9DBO5ky9eZYHwVy8ULfhByZxOBAceeTeJbz kOthIklWnWxHgf0uN2fI/lJ9FXvSGqJCzuvr0xoDcmtH85iTYXY6sy5KoMXWE6TGW7V01I b1yVFGViYxUM7SAwpeMNI9AYYA6a43g= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b="Mn/Dgp2I"; spf=pass (imf23.hostedemail.com: domain of quic_bibekkum@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_bibekkum@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691736892; a=rsa-sha256; cv=none; b=5Wv9HU7URntk/xUNeXy/U2qmBkN/hMwEqICvg4Ze2+Y7hrf7KZFNKfBkAA1y7RqnuEY0M9 HuAK8EuDFBbDdDwdClpb4Psalc/af49DG14v8BHuzrWwfp7GMsNCspIRc7FxYVjRV2TQxv scU79WCB8f5p5ETG2bNt2k/c8BsKRpg= Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37B3uiP0000780; Fri, 11 Aug 2023 06:54:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=LRIRVABkXAVxZmaAaZfUWt+U4vRxzVNLCPyv4TTJSmA=; b=Mn/Dgp2ILVSNdWnlpibV3MzCuLQdnoTZQdNSRYaSpNGdQWm7lhgxlcsNsWzT+w8M0lHs N6+vRTFir3dQcEJkXuo+ckjXMDgwWhkzLd0yB4g06AdheB2lEtA1xcP6PWg8CTTsJ2Dz GNelu9PPf3Dq0voqVPKO4Wpf4oSRrPB6heid+3IhT9toJCuk2LbjOuRWq2UhNzD02A7j 99B15RJVoQmn42kZmYbW6EgrNsydI/mE9ki7K2bb8ojPQ0xNLmlRq1XTAXtsMVSEpCBM xhJdYS6qR1YMS7HFxdLSNiaEoRRyBtADbGjJwyPFWyD3u8/nLkgKKoG3nkJwsYX+2Abn ig== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3sd9030rvk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Aug 2023 06:54:51 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 37B6snQU032245 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Aug 2023 06:54:50 GMT Received: from [10.214.227.50] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Thu, 10 Aug 2023 23:54:32 -0700 Message-ID: <77045024-cf1d-472a-9cf5-5b492a4a0e02@quicinc.com> Date: Fri, 11 Aug 2023 12:24:29 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] cma: introduce CMA_ALLOC_DEBUG config Content-Language: en-US To: Andrew Morton CC: , , , References: <20230809131640.18791-1-quic_bibekkum@quicinc.com> <20230810095451.cada824810441ecc955e2b2e@linux-foundation.org> From: Bibek Kumar Patro In-Reply-To: <20230810095451.cada824810441ecc955e2b2e@linux-foundation.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: TK5bbxsSwLNxu7V9ysnoX50iuu0XjZLY X-Proofpoint-GUID: TK5bbxsSwLNxu7V9ysnoX50iuu0XjZLY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-10_20,2023-08-10_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 spamscore=0 bulkscore=0 impostorscore=0 suspectscore=0 malwarescore=0 mlxlogscore=899 adultscore=0 clxscore=1015 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308110062 X-Rspamd-Queue-Id: 3A3A6140004 X-Rspam-User: X-Stat-Signature: opcnqrkaygu3y3ifus5fa7igrcgqtpzj X-Rspamd-Server: rspam01 X-HE-Tag: 1691736892-115999 X-HE-Meta: U2FsdGVkX1/2hluz8eR4vXNHfNwtGo9NTXlO4Mbru7XdAO04ij7O4wMYSqsAuj6l7e6Hvb3TkQhp0M03Sq8hNnbqyIb2GL0AyI+7sFJibK0XkPHd9lm7+hfZ77c4w9EqHTm4uf3XAwiEUKKGHqhiT0X4dWSaGRshZFMv5sni1CxHPyTfDahEPnhi53Q2ZnCNkZrMhH1sa35V3MPQ4UKLj1cjbr9dOCDt2+nfNIbcSjx4AVYDwtOYHLGuxg1CgU48oQhIQtNOPm6CCmibNAGKFq8wAU+LrYMsm3ZxYYm4N4ggHKi8diA6UoRSB9+XvnWVpXbFyJwJDhcjsdgKNIFcJt28I9w8cpkmeWHSZIiY7twOBuQFvpLlWocxiEXOZoj8fA96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8/10/2023 10:24 PM, Andrew Morton wrote: > On Wed, 9 Aug 2023 18:46:40 +0530 Bibek Kumar Patro wrote: > >> Currently enabling CONFIG_CMA_DEBUG enables DEBUG preprocessor macro. >> If DEBUG is defined, it's equivalent to a printk with KERN_DEBUG loglevel >> flooding the dmesg buffer with pr_debug prints from mm/cma driver and from >> included files as well. This results in excessive amount of CMA logging and >> also might distract the debug teams with unrelated KERN_DEBUG prints.One of >> the ways engineers currently tackle this problem is by passing loglevel=N >> though commandline to suppress KERN_DEBUG messages. This approach can >> sometimes become tiresome due to its repetitive nature. >> This patch proposes an alternative approach by introducing a simple new >> config CONFIG_CMA_ALLOC_DEBUG which only shows the cma bit allocation >> status in case of cma failure and do not enable DEBUG preprocessor macro >> from CONFIG_CMA_DEBUG avoiding excessive CMA logging from pr_debug. >> Engineers and tech teams seeking only for bitmap status in case of cma >> failure can use this simple config instead of worrying about changing >> the loglevel or trying other similar workarounds. > > Would it be better to control this at runtime? With a /proc or /sys tunable? Currently it's being controlled at runtime by changing the /proc/sys/kernel/printk tunable or through loglevel value in cmdline but issue faced by engineers in both these approach is these tunable value would reset every time on reboot and won't retain the set value. So these approaches are being used as workarounds only as of now. Also another issue with the earlier CMA_DEBUG config is the text code size might increase (It might be minuscule sometimes but will happen) due to all pr_debug in the code.