From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8793A21A449 for ; Fri, 14 Nov 2025 01:09:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763082576; cv=none; b=nwdOBmZnL8faBY/s1vcigP/9GX2JjLEF4v21G3RasJNcFkACz4skjKsB3JSn56UDoObYdMLs921i7dsEU1vBbFB0IPxihXDAjih+vg/7D6AjyCAEz46C9ba2+XgU1a2FiwkWVA94jyJMh1f1o0s+VQ+EF24kxhDczmk0H+By9PU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763082576; c=relaxed/simple; bh=fmK0NEdWdF/kEYPSYxn/w3c3W5Hgog4Ht3cnrXiHR8s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AHGeW0GfvAGUKvAIVnrVNfdjBDhM2U/ihTNdMBn8oTYlOzLZfoJ/BXp8vEmGOjk65gySrI6YU2bnaTQrO8uItqH/WK+X6F78lWUIljpYDU3AbpCl0dX0/5e7gRiBjq/Kwonn8dyWxPPzHgW/ATeVsX3PzBDsA3GrEZoRP7YFhWw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=h1j5jNdf; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="h1j5jNdf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B4C1C113D0; Fri, 14 Nov 2025 01:09:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763082576; bh=fmK0NEdWdF/kEYPSYxn/w3c3W5Hgog4Ht3cnrXiHR8s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h1j5jNdfuXYpxfsw0nmd485P7Yt5d/tK0QyWJkSu/4Z5IKr+8Yr2Ajmyx6HScl3lS JCdKRYxWuwC8xHn1tukCkk17e8oeaz11RkiH1+etqLIK48vVwPcqzj/OwJYKlfeJ1n spDaViGMJE46+TIxDYGClXtyph5phXa9V3ofm3fCjlMX75lZA9mk6ErZdjESNGpJYB rRgRksLomwAazrVlF0CW8TVLkdBtQ26uVZ8m/me/Tt+vCE8KA1PHIPtU/rX/dMYNB/ XaeiH+5jiUUqGx7DEJxn+T2lMuyjpGOgfLWtBJmmc9OMKDya18jHRb7z7l2EbjUunh /tdV6FXDY51ZA== From: SeongJae Park To: Jean Delvare Cc: SeongJae Park , linux-mm@kvack.org, LKML , David Hildenbrand Subject: Re: [PATCH] mm/cma: Remove CONFIG_CMA_SYSFS option Date: Thu, 13 Nov 2025 17:09:27 -0800 Message-ID: <20251114010928.151974-1-sj@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251113145636.731a24e4@endymion> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Thu, 13 Nov 2025 14:56:36 +0100 Jean Delvare wrote: > The sysfs interface to CMA has a marginal runtime cost and a small > footprint, there's no reason not to include it in all kernels where > the dependencies are satisfied. Overall change looks good to me. I have a question below, though. > > Signed-off-by: Jean Delvare > --- > As discussed with David: > https://lkml.org/lkml/2025/8/6/371 > > arch/loongarch/configs/loongson3_defconfig | 1 - > arch/s390/configs/debug_defconfig | 1 - > arch/s390/configs/defconfig | 1 - > mm/Kconfig | 7 ------- > mm/Makefile | 4 +++- > mm/cma.h | 4 ++-- > 6 files changed, 5 insertions(+), 13 deletions(-) > > --- linux-6.17.orig/arch/loongarch/configs/loongson3_defconfig > +++ linux-6.17/arch/loongarch/configs/loongson3_defconfig [...] > --- linux-6.17.orig/mm/cma.h > +++ linux-6.17/mm/cma.h > @@ -49,7 +49,7 @@ struct cma { > char name[CMA_MAX_NAME]; > int nranges; > struct cma_memrange ranges[CMA_MAX_RANGES]; > -#ifdef CONFIG_CMA_SYSFS > +#ifdef CONFIG_SYSFS > /* the number of CMA page successful allocations */ > atomic64_t nr_pages_succeeded; > /* the number of CMA page allocation failures */ > @@ -80,7 +80,7 @@ static inline unsigned long cma_bitmap_m > return cmr->count >> cma->order_per_bit; > } > > -#ifdef CONFIG_CMA_SYSFS > +#ifdef CONFIG_SYSFS > void cma_sysfs_account_success_pages(struct cma *cma, unsigned long nr_pages); > void cma_sysfs_account_fail_pages(struct cma *cma, unsigned long nr_pages); > void cma_sysfs_account_release_pages(struct cma *cma, unsigned long nr_pages); Why don't you check CONFIG_CMA together? I think that makes the change more complete and safe. I found there is no file that can be compiled without CONFIG_CMA but still including this header file, so I expect no real issue for now, though. Thanks, SJ [...]