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 C12EFC83F11 for ; Mon, 28 Aug 2023 03:18:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E977228000E; Sun, 27 Aug 2023 23:18:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E47598E0001; Sun, 27 Aug 2023 23:18:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D0F1B28000E; Sun, 27 Aug 2023 23:18:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id C15F88E0001 for ; Sun, 27 Aug 2023 23:18:34 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 90D591A02BA for ; Mon, 28 Aug 2023 03:18:34 +0000 (UTC) X-FDA: 81172055748.17.90D20A6 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by imf01.hostedemail.com (Postfix) with ESMTP id 6F40C40004 for ; Mon, 28 Aug 2023 03:18:31 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=IcSeXWtf; spf=pass (imf01.hostedemail.com: domain of quic_pkondeti@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_pkondeti@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=1693192711; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=QdtGBDjslaHljY4LOmpeC+l3UeDvNVbpOeTZzL5o8SM=; b=KIKFOcEcbLoa+oktygD1eHm7ZkAc3BFe5x8O5OHFWhbXYiBjG1CRr8dUEnI51Noa/Bnnjc ov46sGmL4ep3/QxPQoUArMsOdUfUOa4MVoK+1O2ej/gaL5+DCVgSk4wtp666pehRL89oqy /Ki2f2i+WWHTEwkuN9RN4Q09J845XKw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1693192711; a=rsa-sha256; cv=none; b=nzdu6uu1o8yjb8jp6AHZ/plibsZb3dCkKkB0RWg1gRSbtT+iFyzT+93p0BbdcTzuaz/Em1 KLgYb35Gu4/2noH3agluVHsI0D/sIQii2PFdNOoB4nXTofPE4+hWkfkrvALFTPhi0L7zu0 rCOql7UJwzAvBjlQvzg3NRZmQiNiS9Y= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=IcSeXWtf; spf=pass (imf01.hostedemail.com: domain of quic_pkondeti@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_pkondeti@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37S1xDSi003685; Mon, 28 Aug 2023 03:18:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=qcppdkim1; bh=QdtGBDjslaHljY4LOmpeC+l3UeDvNVbpOeTZzL5o8SM=; b=IcSeXWtfOKJs9bbD5M9lZ7r1p1ssaD3HvfEtr/QjTKnzOTKYox39aAnO40X/Dioyw/ro R4cJNtaa7I0HMmcAlYxPA9KowwdUUvdDQ86FvdKvq0R599dKYPFHG9Jz86ZO3FVV1y8a 51WwalLID7XgFKeMLg3dTohSvL+3gvzFZuwAy+4VkmNl/vn+9sydVHZXwWQFycmZB3+3 aQj/sXuYOG+Vztx8jDNtO4R5Ac0zXyQBDBaT9qpgwc3ze2F7+3FlpsG4FhIRkWaSKH6l YBMXHPvLRjwNcd0CEoj8KyTTbZ1BsYESZdVTDCqpOS2iETOjnAW7mbVm/hKiWu5SSuM8 0Q== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3sq6ruanah-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Aug 2023 03:18:30 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 37S3ITZG021103 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Aug 2023 03:18:29 GMT Received: from hu-pkondeti-hyd.qualcomm.com (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.36; Sun, 27 Aug 2023 20:18:26 -0700 Date: Mon, 28 Aug 2023 08:48:23 +0530 From: Pavan Kondeti To: Bibek Kumar Patro CC: Andrew Morton , , , Pavan Kondeti , Subject: Re: [PATCH v2] cma: introduce CMA_ALLOC_DEBUG config Message-ID: <5df81e82-a4b9-42b8-92ce-daa194016740@quicinc.com> References: <20230809131640.18791-1-quic_bibekkum@quicinc.com> <20230810095451.cada824810441ecc955e2b2e@linux-foundation.org> <9ab7df09-e128-4940-ace5-0cc5ffa1ec4d@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <9ab7df09-e128-4940-ace5-0cc5ffa1ec4d@quicinc.com> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) 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: eDfNco2hcny-TE3HV9pnFymj0nJX_cwD X-Proofpoint-GUID: eDfNco2hcny-TE3HV9pnFymj0nJX_cwD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-27_22,2023-08-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 impostorscore=0 adultscore=0 malwarescore=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 mlxlogscore=931 suspectscore=0 priorityscore=1501 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2308280029 X-Stat-Signature: 3coa5iz4ccib9ezzhcaqzonc453fgey8 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 6F40C40004 X-Rspam-User: X-HE-Tag: 1693192711-820845 X-HE-Meta: U2FsdGVkX19uOU1FwM2Z/biuGjzU8M2Ct8HXoCwqGev2/QaTxieGL3UDo5oXOBw5XIeS/4is0cj3HF+gpOSsLlPAV8X9SZNN9VG7ZHR1meCi0EgRmZH0tDJLbOXTl5eW+qgpxwuxjTT+x4d7Sd4Wgxd2jGTugp9wTFI0RoOtLW7EXvJfuId7sT8KSG8HZQKkD4A9/z058fUiaENj1Aw4Unk+RZENaY/5T82Fig+ZStpmPTs8s7lgxr31iBsx772YYALzqtZK8IhN3R4s2NggA0vl4z0ol6un9+Ck169D6ihWqlcjhyOTQQ+QkL6gCAxl/a872uHUoH5fm4xgEXImTVLXKxjZeRCz0ZDHhiC/g+ikHZIpCsFlVixy5FVVnafRJZpSydz4QUP8vKT8GZVZD1qM0y0rpXYcoU2DJSwumsP3k1Ew7kZEgoz7ri+VGGIOkqDbsPwzuTGd3kGmR++xniuBimQknmWhj251ot47wCUYtHzNZZcILikoyfWMqnmocDmbgKN+bWI0KNtsArSsYtmmPlHXXxilgk7Ws3jhoY0eM48PVk+hGIV+6wDmk+L2MHf/EscrxhdmQO6GaJSkS50lO8jjPQQlRJiG1sVjVOkuhdxRPILOZ1sxqWqHkAGBbYbJWel8+Mu4t8GTRXT1FD/LHUmC0ikzNfHvXv9J/IBFgMZdKEkZIHmDBwUavekBluKUSvQdXLalK2zkp5ufed87rn+9xJQtJC7s4Kf0MWatcGRgq3KePRwjUAMDWaaAX9f6Hstb4CGTRStT4swjsGR0KjHKFYEUI7q8ktyCVFcDMZCWzdWUEfK/AV6ypnmxUZgWM3EHyzcue5lzttP0M133VsyxLsYXGcXE+DU8hwa0ObasSQzyI8NoT0+y4hs4sOiaD1Hu+VjUlnUXOR7d+kNKsEyOE1nX3RvsL+xQQVgDlMXAwDvF+AegqNxH1rOhM93Bql9bHbWzqStuw7e vSd4jxvB G8Owii/F1oYLgGb/nLYqqmi1DVayNT9Gcg3XCRz5j96JpkXDZGyIZXXvNF0pTd/az0Ok0cmQKtsUosbIVo1p7WMoVPt/hOltfNtYGbpESN2Jhwmz/AeEnrEledalrUAwxD5f6da/EhtkvpzfpgW8QCCu+UXeQfcz9KYSa9giF05FDtHJbGxLm2JfGie4evyTIjEtNHRaUcrcqq0k2YKXI9oEUeodL7qn2j5o2yqpiFaXv5eEc8eTzxuXcNi97wf8ean/zxJJYwRN0H3EsL69DBKw9VFmG6xbSyre/GX6ADleypCWv+OTFP3URx8ph2s0MA5pgqeUijltH6aBUHNLYIYtRua+OH5l9zaXV X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Aug 25, 2023 at 06:38:13PM +0530, Bibek Kumar Patro wrote: > On 8/14/2023 8:30 AM, Pavan Kondeti wrote: > > Bibek, > > > > On Thu, Aug 10, 2023 at 09:54:51AM -0700, 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? > > > > Thanks Andrew for suggestion and Pavan for the details, tunable approach > looks viable too since we get to control this during runtime, but had > one query in mind where your inputs would help. In case any engineer wishes > to check boot time CMA failures, would it be easier to use a > CONFIG or /proc , /sys tunable? > (Assuming for /proc or /sys tunable, one has to modify the > init/post_boot scripts to mount the fs and set the tunable to true ) > Good point about on how to enable this during boot. A sysctl knob is good here since it can be turned on/off via kernel commandline. This means, you don't need to modify the kernel image and wait for the userspace to come up. See Documentation/admin-guide/kernel-parameters.txt (grep for sysctl) for more details. Thanks, Pavan