From patchwork Mon Feb 5 03:16:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 13544947 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 516ADC4828F for ; Mon, 5 Feb 2024 03:17:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CAC336B0071; Sun, 4 Feb 2024 22:16:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C5C586B0072; Sun, 4 Feb 2024 22:16:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B4ABF6B0075; Sun, 4 Feb 2024 22:16:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id A54E96B0071 for ; Sun, 4 Feb 2024 22:16:59 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 28C3E1C1015 for ; Mon, 5 Feb 2024 03:16:59 +0000 (UTC) X-FDA: 81756288558.10.60EE031 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf25.hostedemail.com (Postfix) with ESMTP id 30923A0010 for ; Mon, 5 Feb 2024 03:16:55 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf25.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707103016; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=vTKqirhaXyEH973oJIDZX+oWADtKQgwEQBqb/lJfcyw=; b=2tw8XH8EnAzrMgDWi1qjzn+he0Q6RCsnD/CDjlL8g4kr4Y8OB9jWEW+/KaQIivGdTY7F2C UKycfImfqy5vUJljAsCEMyW9lRs1eXz/Je6yM/OU11QQEG7NjddxzFwo7K0Z6sAbS9QJTF EBIjRgzo+7MBAyYu9XXiHWoS5/qcm5c= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf25.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707103016; a=rsa-sha256; cv=none; b=ZVCnZpG8aafCazN1e1qLfJu3XbwT1Q8ja0sdPDPwLGml9PTf/e6z76ZyG0/q72tf4kpgY8 F1llFq+KG+xGZNkUhUUpdz/WNIbzgyYZ+q5LhSmZ0nxV2BjWLNfvN/l6L0VxqY8FSB58OI QETVwVBWCLNGciZ1CD/ChlSpRi0drbU= Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 619521FB; Sun, 4 Feb 2024 19:17:37 -0800 (PST) Received: from a077893.blr.arm.com (a077893.blr.arm.com [10.162.40.23]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 54B783F762; Sun, 4 Feb 2024 19:16:53 -0800 (PST) From: Anshuman Khandual To: linux-mm@kvack.org Cc: Anshuman Khandual , Andrew Morton , linux-kernel@vger.kernel.org Subject: [PATCH] mm/cma: Drop CONFIG_CMA_DEBUG Date: Mon, 5 Feb 2024 08:46:47 +0530 Message-Id: <20240205031647.283510-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2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nDWI8YRkGZyHsbFvESCdZMLCxlalEsAQ++QIZLB mAfrYBjA WgvcFOlhKI/RxCsUhBJpuvaxboXeH0pLqeAimIpriC9Rnoez/lMqqpBbl1ftam7u+1g/V/GkrF6GkrNrnDJ/JKFOOo3bs2Tfn+3pFZqiyHql4IQJ0m0H+ebtjnG6bk3vBle3vOGzMd00ymSkO7URtgRTDxkQLFrzOBQTVrBGlOwihdkYBPBNQKcCEo1cM6Uakgdzy0S0ksfUref6WozXSbPCBx1prjAAcUOhoxzjKU0TNK/4xoAsLWwPioX3FJ6FLl3g2nEgPFAJLfFYMJzc3YMYBKmfjNSp34oui0cPS3fluerD6ssNCLNBKkXK5dmt/zB2KLvD6NJoQKzGvoQteL1i0phSj1FVSS8FdZ4Jmccye5DcGxti5XEBCXfqxG15jFhsY 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: List-Subscribe: List-Unsubscribe: All pr_debug() prints in (mm/cma.c) could be enabled via standard Makefile based method. Besides cma_debug_show_areas() should always be called during cma_alloc() failure path. This seemingly redundant config, CONFIG_CMA_DEBUG can be dropped without any problem. Cc: Andrew Morton Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- This applies on v6.8-rc3. mm/Kconfig | 9 --------- mm/cma.c | 9 --------- 2 files changed, 18 deletions(-) diff --git a/mm/Kconfig b/mm/Kconfig index ffc3a2ba3a8c..35fa9940e61f 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -901,15 +901,6 @@ config CMA If unsure, say "n". -config CMA_DEBUG - bool "CMA debug messages (DEVELOPMENT)" - depends on DEBUG_KERNEL && CMA - help - Turns on debug messages in CMA. This produces KERN_DEBUG - messages for every CMA call as well as various messages while - processing calls such as dma_alloc_from_contiguous(). - This option does not affect warning and error messages. - config CMA_DEBUGFS bool "CMA debugfs interface" depends on CMA && DEBUG_FS diff --git a/mm/cma.c b/mm/cma.c index 7c09c47e530b..ed6581ef50c1 100644 --- a/mm/cma.c +++ b/mm/cma.c @@ -14,11 +14,6 @@ #define pr_fmt(fmt) "cma: " fmt -#ifdef CONFIG_CMA_DEBUG -#ifndef DEBUG -# define DEBUG -#endif -#endif #define CREATE_TRACE_POINTS #include @@ -387,7 +382,6 @@ int __init cma_declare_contiguous_nid(phys_addr_t base, return ret; } -#ifdef CONFIG_CMA_DEBUG static void cma_debug_show_areas(struct cma *cma) { unsigned long next_zero_bit, next_set_bit, nr_zero; @@ -412,9 +406,6 @@ static void cma_debug_show_areas(struct cma *cma) pr_cont("=> %lu free of %lu total pages\n", nr_total, cma->count); spin_unlock_irq(&cma->lock); } -#else -static inline void cma_debug_show_areas(struct cma *cma) { } -#endif /** * cma_alloc() - allocate pages from contiguous area