From patchwork Mon Feb 5 05:19:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 13544971 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 D50BFC48291 for ; Mon, 5 Feb 2024 05:19:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 596C36B0074; Mon, 5 Feb 2024 00:19:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 546E16B0075; Mon, 5 Feb 2024 00:19:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 435A46B0078; Mon, 5 Feb 2024 00:19:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 356E36B0074 for ; Mon, 5 Feb 2024 00:19:40 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id C084C803C8 for ; Mon, 5 Feb 2024 05:19:39 +0000 (UTC) X-FDA: 81756597678.27.4EB29EA Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf26.hostedemail.com (Postfix) with ESMTP id E962F140010 for ; Mon, 5 Feb 2024 05:19:37 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf26.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=1707110378; 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=vXKiVp+CeuaAAR3JrvUgEGBG1/WLwO++FSTuFn9NyRs=; b=3PSMhQz+z4Uuvr55xv+WhHxcEGkTuZA5s4XZTbdzelbh6XpqzhhFn0Fw/c17qs8PxQKT/c d8p6RSfnL3Ks1gmr7kXhcDs6Px9FpIJT6x/nrlde0zTJQzkRSbvC08vNcDHJwzrt3MHE/0 4V4Ldkw6YW5AlCBz2HWL4GjgUOtxlWo= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf26.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=1707110378; a=rsa-sha256; cv=none; b=sPkwfdDvbUoYaUsqesrrq3QOL01rKj50pySmDAWKwr8izAJRZUYa/OsNwdT2v2ShNPEZfI eE37EfIVuoZFIqOfuY3CYv3noL2yr1i98PgBClF464tTt3xU9UKX0m8vVTIjwm0rdj/R54 E3mYngxG+iovTYoZDzHBfMv5ZMNAnN4= 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 3A60D1FB; Sun, 4 Feb 2024 21:20:19 -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 2A94D3F5A1; Sun, 4 Feb 2024 21:19:34 -0800 (PST) From: Anshuman Khandual To: linux-mm@kvack.org Cc: Anshuman Khandual , Andrew Morton , linux-kernel@vger.kernel.org Subject: [PATCH] mm/cma: Make MAX_CMA_AREAS = CONFIG_CMA_AREAS Date: Mon, 5 Feb 2024 10:49:29 +0530 Message-Id: <20240205051929.298559-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: E962F140010 X-Stat-Signature: dd6aaxymawacxutberazkbzoz3u3wwd5 X-HE-Tag: 1707110377-324713 X-HE-Meta: U2FsdGVkX19gnOyE66svwtYiQfCPazcvEdeN7NISpH3GLIbvJwJYI8zq3foM3Z1ZN4U4NbcVmfend4/SZ8ab3nqWUgeFpvVyc2hHUfCZICVn/WRGxjNSz/yIzUQMN+hLeCxqXzeC/w31oZllMNYAMLxdETXkAcCutQ/4C3TjRi2iWAvE2piaBXhp/hI+M55MOVJlejszjubK1KGGiHshG1KaXP21IKtlZK+XHxiMx9G5cnkGhoMrJdiuXeF+bu4iqcNZ4UltkAdeg5VR8z1JPVYWiEBnMZGwwzYN2QUfVfOFCG/+dQI1qA/pI0UrglPe/9iep0VEs+z+4j+9Y4cey+J5fkoplB7RDH0l4FQizLrU7yu3RvlxY+vmUNIPx8inKg+nZwlSsMaFV+DV79otxadY8FUx0BdYuALHqdQFLcfS/nOXhleBMyqGWaDt3zwf2FW8z9gkY7rifu4R2oHdw03awKePX2YHpKAuG+f16vIMqTJTf+KUEGHmrBN9y1hsYa1tEDb35FyGwBNSfIpGVpj7XgiljJvE+UzW1dBO+MGA1mLN2poSDPAjtzrmXVxBn9OANw6MnN/3TvLKaPdNjhtdr99ry36AlaKwU/NtVj53BTAYL9wohujFvvePbdyCh0Hw0JcZ/Ho/Kx5BHeKhfDjl9gn6tkQq4WjxVbwMovoWoMfrK2mXLe03S3cQdDtAsY2v/wC/dL9q2vaD0y+zzUWgHwDRgMsv2DVpr1rLA33/MQpv6YzyeXE/1qFV506pv2mIb1355/Ujn/+1mLVLQabYlbe20Eg6k4gYQKJJjEmvi2yWMJCAcSpICMr9mW3okxfuqbA/lv02j2zIkaHRxRe04HslaMvV0+avw3o6T4qO0FdLBNbsSY8UYcSgpGu/W6ga795blTmnBtZwgCjvo0kMAiF6CrYdomzjIiiWuM2wGABMsf96U8Osnahi80B4L2fQvTgde2CJ8Wy5eav SqCwrwSD q0DhsYALItgP0xXO6zL5CEHx98sSKvFTWcMgtTxJrN4fYLVedlc2CrKSRp+K8skd3pVqklOHa3DxvUznBuMiw4YkdRaditAkJPLMcuknHAA4llxQHCYLO3EiUCV/nV7YCY18FtWApXRxBphNdR7tKSw0nsFH0QadDXylBROVpSmHwJWz7d9f9OxD0Xq89GF3ciC9p+FVmQAvP3kmT9uN25lNRuFeNiunfe4MAZRWVf+b2aJp+38YzpMeD3UtpenGk4OVNRbA+/F7K03G7iV9O5K6rgYvTWXK3vG5iOc3stmuWzO2Jajf0OsFTrYPQNstUxUAGk6HHp64AvFMSAZN4Av+TPn2dBwT2jDnlrQ2aAV3QE+v2JdH+lclPWeDDNlYz4BU7 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: There is no real difference between the global area, and other additionally configured CMA areas via CONFIG_CMA_AREAS that always defaults without user input. This makes MAX_CMA_AREAS same as CONFIG_CMA_AREAS, also incrementing its default values, thus maintaining current default for MAX_CMA_AREAS both for UMA and NUMA systems. Cc: Andrew Morton Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- include/linux/cma.h | 6 +----- mm/Kconfig | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/linux/cma.h b/include/linux/cma.h index 63873b93deaa..9db877506ea8 100644 --- a/include/linux/cma.h +++ b/include/linux/cma.h @@ -6,12 +6,8 @@ #include #include -/* - * There is always at least global CMA area and a few optional - * areas configured in kernel .config. - */ #ifdef CONFIG_CMA_AREAS -#define MAX_CMA_AREAS (1 + CONFIG_CMA_AREAS) +#define MAX_CMA_AREAS CONFIG_CMA_AREAS #endif #define CMA_MAX_NAME 64 diff --git a/mm/Kconfig b/mm/Kconfig index 35fa9940e61f..88ba99d84ac3 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -917,14 +917,14 @@ config CMA_SYSFS config CMA_AREAS int "Maximum count of the CMA areas" depends on CMA - default 19 if NUMA - default 7 + default 20 if NUMA + default 8 help CMA allows to create CMA areas for particular purpose, mainly, used as device private area. This parameter sets the maximum number of CMA area in the system. - If unsure, leave the default value "7" in UMA and "19" in NUMA. + If unsure, leave the default value "8" in UMA and "20" in NUMA. config MEM_SOFT_DIRTY bool "Track memory changes"