xref: /linux/mm/damon/Kconfig (revision e9ef810dfee7a2227da9d423aecb0ced35faddbe)
12224d848SSeongJae Park# SPDX-License-Identifier: GPL-2.0-only
22224d848SSeongJae Park
32224d848SSeongJae Parkmenu "Data Access Monitoring"
42224d848SSeongJae Park
52224d848SSeongJae Parkconfig DAMON
62224d848SSeongJae Park	bool "DAMON: Data Access Monitoring Framework"
72224d848SSeongJae Park	help
82224d848SSeongJae Park	  This builds a framework that allows kernel subsystems to monitor
92224d848SSeongJae Park	  access frequency of each memory region. The information can be useful
102224d848SSeongJae Park	  for performance-centric DRAM level memory management.
112224d848SSeongJae Park
126901cf55SDiederik de Haas	  See https://www.kernel.org/doc/html/latest/mm/damon/index.html for
132224d848SSeongJae Park	  more information.
142224d848SSeongJae Park
1517ccae8bSSeongJae Parkconfig DAMON_KUNIT_TEST
1617ccae8bSSeongJae Park	bool "Test for damon" if !KUNIT_ALL_TESTS
1717ccae8bSSeongJae Park	depends on DAMON && KUNIT=y
1817ccae8bSSeongJae Park	default KUNIT_ALL_TESTS
1917ccae8bSSeongJae Park	help
2017ccae8bSSeongJae Park	  This builds the DAMON Kunit test suite.
2117ccae8bSSeongJae Park
2217ccae8bSSeongJae Park	  For more information on KUnit and unit tests in general, please refer
2317ccae8bSSeongJae Park	  to the KUnit documentation.
2417ccae8bSSeongJae Park
2517ccae8bSSeongJae Park	  If unsure, say N.
2617ccae8bSSeongJae Park
273f49584bSSeongJae Parkconfig DAMON_VADDR
28f7d911c3SSeongJae Park	bool "Data access monitoring operations for virtual address spaces"
293f49584bSSeongJae Park	depends on DAMON && MMU
303f49584bSSeongJae Park	select PAGE_IDLE_FLAG
31*0acfc656SSeongJae Park	default DAMON
323f49584bSSeongJae Park	help
33f7d911c3SSeongJae Park	  This builds the default data access monitoring operations for DAMON
34f24b0626SGeert Uytterhoeven	  that work for virtual address spaces.
353f49584bSSeongJae Park
36a28397beSSeongJae Parkconfig DAMON_PADDR
37f7d911c3SSeongJae Park	bool "Data access monitoring operations for the physical address space"
38a28397beSSeongJae Park	depends on DAMON && MMU
39a28397beSSeongJae Park	select PAGE_IDLE_FLAG
40*0acfc656SSeongJae Park	default DAMON
41a28397beSSeongJae Park	help
42f7d911c3SSeongJae Park	  This builds the default data access monitoring operations for DAMON
43a28397beSSeongJae Park	  that works for the physical address space.
44a28397beSSeongJae Park
4517ccae8bSSeongJae Parkconfig DAMON_VADDR_KUNIT_TEST
46f7d911c3SSeongJae Park	bool "Test for DAMON operations" if !KUNIT_ALL_TESTS
4717ccae8bSSeongJae Park	depends on DAMON_VADDR && KUNIT=y
4817ccae8bSSeongJae Park	default KUNIT_ALL_TESTS
4917ccae8bSSeongJae Park	help
50f7d911c3SSeongJae Park	  This builds the DAMON virtual addresses operations Kunit test suite.
5117ccae8bSSeongJae Park
5217ccae8bSSeongJae Park	  For more information on KUnit and unit tests in general, please refer
5317ccae8bSSeongJae Park	  to the KUnit documentation.
5417ccae8bSSeongJae Park
5517ccae8bSSeongJae Park	  If unsure, say N.
5617ccae8bSSeongJae Park
57c951cd3bSSeongJae Parkconfig DAMON_SYSFS
58c951cd3bSSeongJae Park	bool "DAMON sysfs interface"
59c951cd3bSSeongJae Park	depends on DAMON && SYSFS
60*0acfc656SSeongJae Park	default DAMON
61c951cd3bSSeongJae Park	help
62c951cd3bSSeongJae Park	  This builds the sysfs interface for DAMON.  The user space can use
63c951cd3bSSeongJae Park	  the interface for arbitrary data access monitoring.
64c951cd3bSSeongJae Park
65b8ee5575SSeongJae Parkconfig DAMON_SYSFS_KUNIT_TEST
6612d02165SSeongJae Park	bool "Test for damon sysfs interface" if !KUNIT_ALL_TESTS
67b8ee5575SSeongJae Park	depends on DAMON_SYSFS && KUNIT=y
68b8ee5575SSeongJae Park	default KUNIT_ALL_TESTS
69b8ee5575SSeongJae Park	help
70b8ee5575SSeongJae Park	  This builds the DAMON sysfs interface Kunit test suite.
71b8ee5575SSeongJae Park
72b8ee5575SSeongJae Park	  For more information on KUnit and unit tests in general, please refer
73b8ee5575SSeongJae Park	  to the KUnit documentation.
74b8ee5575SSeongJae Park
75b8ee5575SSeongJae Park	  If unsure, say N.
76b8ee5575SSeongJae Park
7743b0536cSSeongJae Parkconfig DAMON_RECLAIM
7843b0536cSSeongJae Park	bool "Build DAMON-based reclaim (DAMON_RECLAIM)"
7943b0536cSSeongJae Park	depends on DAMON_PADDR
8043b0536cSSeongJae Park	help
8143b0536cSSeongJae Park	  This builds the DAMON-based reclamation subsystem.  It finds pages
8243b0536cSSeongJae Park	  that not accessed for a long time (cold) using DAMON and reclaim
8343b0536cSSeongJae Park	  those.
8443b0536cSSeongJae Park
8543b0536cSSeongJae Park	  This is suggested to be used as a proactive and lightweight
8643b0536cSSeongJae Park	  reclamation under light memory pressure, while the traditional page
8743b0536cSSeongJae Park	  scanning-based reclamation is used for heavy pressure.
8843b0536cSSeongJae Park
8940e983ccSSeongJae Parkconfig DAMON_LRU_SORT
9040e983ccSSeongJae Park	bool "Build DAMON-based LRU-lists sorting (DAMON_LRU_SORT)"
9140e983ccSSeongJae Park	depends on DAMON_PADDR
9240e983ccSSeongJae Park	help
9340e983ccSSeongJae Park	  This builds the DAMON-based LRU-lists sorting subsystem.  It tries to
9440e983ccSSeongJae Park	  protect frequently accessed (hot) pages while rarely accessed (cold)
9540e983ccSSeongJae Park	  pages reclaimed first under memory pressure.
9640e983ccSSeongJae Park
972224d848SSeongJae Parkconfig DAMON_STAT
98	bool "Build data access monitoring stat (DAMON_STAT)"
99	depends on DAMON_PADDR
100	help
101	  This builds the DAMON-based access monitoring statistics subsystem.
102	  It runs DAMON and expose access monitoring results in simple stat
103	  metrics.
104
105config DAMON_STAT_ENABLED_DEFAULT
106	bool "Enable DAMON_STAT by default"
107	depends on DAMON_PADDR
108	default DAMON_STAT
109	help
110	  Whether to enable DAMON_STAT by default.  Users can disable it in
111	  boot or runtime using its 'enabled' parameter.
112
113endmenu
114