Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2204495rdb; Sun, 4 Feb 2024 21:19:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IGitgsaCEhMLXDLwc7W5k5qiP3+eTydoEKcwiSeec5pr+EA0J7WrB2UczcgV5GEa6KkoGyw X-Received: by 2002:a17:906:6dd6:b0:a36:bbcc:1ab with SMTP id j22-20020a1709066dd600b00a36bbcc01abmr5440953ejt.17.1707110389412; Sun, 04 Feb 2024 21:19:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707110389; cv=pass; d=google.com; s=arc-20160816; b=myt8cIAxxW43ZG64YPGTP9LPSDqvhBHm7mFWrwFRdoErcCnvYdfV9qOGypaA9OQqvR ULLsATUfIHuQWCvfKylIudt4U0Et4n1J2eaOuH+pHg+2T8BVbfjsGFuPSo3QDXk+5n/M By/ExykD6Z5uwPlirZ+DSMdQy4QUVTJQed4sOp6jjViUMApRL5gXGBqPQgFDnCPhqQGR UdwCc2RkNd1AOHe9VoKHcZ/mWxRCvV2jyXahdGg2jZ4J253yv+XkBl3c92moxDdJF5iK iNErTD9GmVPkNJYni85omzPdKCtQn9cLzQHcIcjAJ0fP2Ri94fW1BE6zn+TzQmxBKP84 /2YQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=vXKiVp+CeuaAAR3JrvUgEGBG1/WLwO++FSTuFn9NyRs=; fh=G50WN8Rp6cxK/DuW/SEeMB4Z133s7YkenwVPoxwMSAQ=; b=ZSK+YbE4AzjuSyubgP8+5r99koq+GVvhMeUqVpRHLFnNA5nFvx80VjVVSCXcBTEQ6w ZOjIKHuufLH9Fpj8gf/lmOdKavg1CTOcVT0l9DpLjJsjyzuv5v25Uja/PavtPN7tJSx2 iaGVpJl4gDFcgwHAunFZjoIAs0nkAjv7yd+6Oi+TNATqY6z/EMG5a11vEsDkcKd/KAou wSGeXvdAbCBXst+NjGxvXckDv8/KnbRht67LfLJtz0B8nxRK+DWbs5TEzVlMqsa01dll t8SpEXul4kFjPQwSdYA5qg/N8axJLz3Wv8wuRF0WAelOkRizeX0BkvlE1YxcqFBBMrC1 +lhA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-52044-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com X-Forwarded-Encrypted: i=1; AJvYcCUtzpSkanvhhH/6/aDh3MfwzNgDL2xAm11+ATbZcg94k/EIXj2/scNd/6EQYn/CDKvdmoH+zvfy+k8MOrGZFKTORPJmf4EifGE7JYIXew== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r6-20020a1709067fc600b00a2ca0482c51si3574279ejs.695.2024.02.04.21.19.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 21:19:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52044-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-52044-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 032E51F22BCB for ; Mon, 5 Feb 2024 05:19:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 017F7B671; Mon, 5 Feb 2024 05:19:41 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CC10AB645 for ; Mon, 5 Feb 2024 05:19:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707110380; cv=none; b=RppBT8gYHZhKuxZ4owZliFYzrpQOCAXtHVYnKd1Gs5v3NigrAX3ZL9p8P1GxrRTABfF+oIwakJBEsrIowd/LdYnjC5NUeM64QOpUk0pNmtg45lr/9pkSHQt64lN0ivx4FyzN4DbAeEHSGMam7CmVEbi8MNxN931/SD2XH1VIKIQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707110380; c=relaxed/simple; bh=LNvoRVHOHOXT7MvScBmB66UiOPGnGVcsj/8+dvqjwGE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Y+9kfFrSHSuhxEg93B+Uq9MJ1OkBsy+fgt4wBGlnar8tlXHa1Y7VSSrLVZ4ruxK0TPfv45PdZ1vQPvSXghi49ULO6fgnkDnJZ38StnzijSUJjvCgBIb8lsBX3mmvR1nlhnKIvmeuxO5zoDKzZ9bAPpoatl3co6RVRn6lRAj3CNg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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" -- 2.25.1