Skip to contentSkip to conversation

mm/damon: build-enable essential DAMON components by default

RFC PATCH New SeongJae Park 1 participant 3 messages May 12, 2025

Subsystems (2)
lore
Share & tools
lore

SeongJae Park

author maintainer
#0 lore raw

cover mm/damon: build-enable essential DAMON components by default

As of this writing, a few major distros including Alma, Amazon, Android, CentOS, Debian, Fedora, and Oracle are build-enabling DAMON (set CONFIG_DAMON[1]). Configuring DAMON is not very easy, since it is disabled by default, and there are multiple essential options that need to be manually turned on, one by one. Make it easier, by grouping essential configurations to be enabled with one selection, and enabling build of the essential parts of DAMON by default.

Note that build-enabling DAMON does not introduce a real risk, since it makes no behavioral change by default. It requires users to make explicit requests to do something. Only one potential risk is making the size of the kernel a little bit larger. On a configuration, it increases the resulting kernel package binary size by 337,685 bytes, which is about 0.1 % of the final package file.

[1] https://oracle.github.io/kconfigs/?config=UTS_RELEASE&config=DAMON

SeongJae Park (2):
mm/damon/Kconfig: defaults VADDR, PADDR, and SYSFS to DAMON mm/damon/Kconfig: enable CONFIG_DAMON by default

 mm/damon/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

base-commit: 399b2f61ec1add307a04f0d128a3de333c4d1daf

Signature · 1 line
2.39.5
author maintainer
#1 lore raw

RFC PATCH 1/2 mm/damon/Kconfig: defaults VADDR, PADDR, and SYSFS to DAMON

It is suggested to enable DAMON_VADDR, DAMON_PADDR and DAMON_SYSFS configurations together with DAMON, since those are essential parts of DAMON for optimum and usual usages. Because those need to be enabled one by one, and there are other test-purpose or non-essential configurations, it is easy to be confused and make mistakes at setup. Make the essential configuration defaults to CONFIG_DAMON, so that those can be enabled by default with single change.

---
 mm/damon/Kconfig | 3 +++
 1 file changed, 3 insertions(+)
mm/damon/Kconfig +3 -0
index c213cf8b5638..c93d0c56b963 100644
@@ -28,6 +28,7 @@ config DAMON_VADDR
 	bool "Data access monitoring operations for virtual address spaces"
 	depends on DAMON && MMU
 	select PAGE_IDLE_FLAG
+	default DAMON
 	help
 	  This builds the default data access monitoring operations for DAMON
 	  that work for virtual address spaces.
@@ -36,6 +37,7 @@ config DAMON_PADDR
 	bool "Data access monitoring operations for the physical address space"
 	depends on DAMON && MMU
 	select PAGE_IDLE_FLAG
+	default DAMON
 	help
 	  This builds the default data access monitoring operations for DAMON
 	  that works for the physical address space.
@@ -55,6 +57,7 @@ config DAMON_VADDR_KUNIT_TEST
 config DAMON_SYSFS
 	bool "DAMON sysfs interface"
 	depends on DAMON && SYSFS
+	default DAMON
 	help
 	  This builds the sysfs interface for DAMON.  The user space can use
 	  the interface for arbitrary data access monitoring.
Signature · 1 line
2.39.5
author maintainer
#2 lore raw

RFC PATCH 2/2 mm/damon/Kconfig: enable CONFIG_DAMON by default

In reply to SeongJae Park

As of this writing, a few major distros including Alma, Amazon, Android, CentOS, Debian, Fedora, and Oracle are build-enabling DAMON (set CONFIG_DAMON[1]). Enabling it by default will help configuration setups for them and future users easier.

Build-enabling DAMON does not introduce a real risk since it makes no behavioral change by default. It requires users to make explicit requests to do something. Only one potential risk is making the size of the kernel a little bit larger. On a configuration, it increases the resulting kernel package size by 337,685 bytes, which is about 0.1 % of the final package file.

Hence, the benefit of enabling CONFIG_DAMON outweighs the potential risk. Set CONFIG_DAMON by default.

[1] https://oracle.github.io/kconfigs/?config=UTS_RELEASE&config=DAMON

---
 mm/damon/Kconfig | 1 +
 1 file changed, 1 insertion(+)
mm/damon/Kconfig +1 -0
index c93d0c56b963..551745df011b 100644
@@ -4,6 +4,7 @@ menu "Data Access Monitoring"
 
 config DAMON
 	bool "DAMON: Data Access Monitoring Framework"
+	default y
 	help
 	  This builds a framework that allows kernel subsystems to monitor
 	  access frequency of each memory region. The information can be useful
Signature · 1 line
2.39.5