0001 # SPDX-License-Identifier: GPL-2.0-only
0002
0003 menu "Data Access Monitoring"
0004
0005 config DAMON
0006 bool "DAMON: Data Access Monitoring Framework"
0007 help
0008 This builds a framework that allows kernel subsystems to monitor
0009 access frequency of each memory region. The information can be useful
0010 for performance-centric DRAM level memory management.
0011
0012 See https://damonitor.github.io/doc/html/latest-damon/index.html for
0013 more information.
0014
0015 config DAMON_KUNIT_TEST
0016 bool "Test for damon" if !KUNIT_ALL_TESTS
0017 depends on DAMON && KUNIT=y
0018 default KUNIT_ALL_TESTS
0019 help
0020 This builds the DAMON Kunit test suite.
0021
0022 For more information on KUnit and unit tests in general, please refer
0023 to the KUnit documentation.
0024
0025 If unsure, say N.
0026
0027 config DAMON_VADDR
0028 bool "Data access monitoring operations for virtual address spaces"
0029 depends on DAMON && MMU
0030 select PAGE_IDLE_FLAG
0031 help
0032 This builds the default data access monitoring operations for DAMON
0033 that work for virtual address spaces.
0034
0035 config DAMON_PADDR
0036 bool "Data access monitoring operations for the physical address space"
0037 depends on DAMON && MMU
0038 select PAGE_IDLE_FLAG
0039 help
0040 This builds the default data access monitoring operations for DAMON
0041 that works for the physical address space.
0042
0043 config DAMON_VADDR_KUNIT_TEST
0044 bool "Test for DAMON operations" if !KUNIT_ALL_TESTS
0045 depends on DAMON_VADDR && KUNIT=y
0046 default KUNIT_ALL_TESTS
0047 help
0048 This builds the DAMON virtual addresses operations Kunit test suite.
0049
0050 For more information on KUnit and unit tests in general, please refer
0051 to the KUnit documentation.
0052
0053 If unsure, say N.
0054
0055 config DAMON_SYSFS
0056 bool "DAMON sysfs interface"
0057 depends on DAMON && SYSFS
0058 help
0059 This builds the sysfs interface for DAMON. The user space can use
0060 the interface for arbitrary data access monitoring.
0061
0062 config DAMON_DBGFS
0063 bool "DAMON debugfs interface"
0064 depends on DAMON_VADDR && DAMON_PADDR && DEBUG_FS
0065 help
0066 This builds the debugfs interface for DAMON. The user space admins
0067 can use the interface for arbitrary data access monitoring.
0068
0069 If unsure, say N.
0070
0071 config DAMON_DBGFS_KUNIT_TEST
0072 bool "Test for damon debugfs interface" if !KUNIT_ALL_TESTS
0073 depends on DAMON_DBGFS && KUNIT=y
0074 default KUNIT_ALL_TESTS
0075 help
0076 This builds the DAMON debugfs interface Kunit test suite.
0077
0078 For more information on KUnit and unit tests in general, please refer
0079 to the KUnit documentation.
0080
0081 If unsure, say N.
0082
0083 config DAMON_RECLAIM
0084 bool "Build DAMON-based reclaim (DAMON_RECLAIM)"
0085 depends on DAMON_PADDR
0086 help
0087 This builds the DAMON-based reclamation subsystem. It finds pages
0088 that not accessed for a long time (cold) using DAMON and reclaim
0089 those.
0090
0091 This is suggested to be used as a proactive and lightweight
0092 reclamation under light memory pressure, while the traditional page
0093 scanning-based reclamation is used for heavy pressure.
0094
0095 config DAMON_LRU_SORT
0096 bool "Build DAMON-based LRU-lists sorting (DAMON_LRU_SORT)"
0097 depends on DAMON_PADDR
0098 help
0099 This builds the DAMON-based LRU-lists sorting subsystem. It tries to
0100 protect frequently accessed (hot) pages while rarely accessed (cold)
0101 pages reclaimed first under memory pressure.
0102
0103 endmenu