^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) # SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) menu "Data Access Monitoring"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) config DAMON
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) bool "DAMON: Data Access Monitoring Framework"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) This builds a framework that allows kernel subsystems to monitor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) access frequency of each memory region. The information can be useful
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) for performance-centric DRAM level memory management.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) See https://damonitor.github.io/doc/html/latest-damon/index.html for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) more information.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) config DAMON_KUNIT_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) bool "Test for damon" if !KUNIT_ALL_TESTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) depends on DAMON && KUNIT=y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) default KUNIT_ALL_TESTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) This builds the DAMON Kunit test suite.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) For more information on KUnit and unit tests in general, please refer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) to the KUnit documentation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) config DAMON_VADDR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) bool "Data access monitoring primitives for virtual address spaces"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) depends on DAMON && MMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) select PAGE_IDLE_FLAG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) This builds the default data access monitoring primitives for DAMON
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) that work for virtual address spaces.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) config DAMON_PADDR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) bool "Data access monitoring primitives for the physical address space"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) depends on DAMON && MMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) select PAGE_IDLE_FLAG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) This builds the default data access monitoring primitives for DAMON
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) that works for the physical address space.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) config DAMON_VADDR_KUNIT_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) bool "Test for DAMON primitives" if !KUNIT_ALL_TESTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) depends on DAMON_VADDR && KUNIT=y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) default KUNIT_ALL_TESTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) This builds the DAMON virtual addresses primitives Kunit test suite.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) For more information on KUnit and unit tests in general, please refer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) to the KUnit documentation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) config DAMON_DBGFS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) bool "DAMON debugfs interface"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) depends on DAMON_VADDR && DAMON_PADDR && DEBUG_FS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) This builds the debugfs interface for DAMON. The user space admins
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) can use the interface for arbitrary data access monitoring.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) config DAMON_DBGFS_KUNIT_TEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) bool "Test for damon debugfs interface" if !KUNIT_ALL_TESTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) depends on DAMON_DBGFS && KUNIT=y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) default KUNIT_ALL_TESTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) This builds the DAMON debugfs interface Kunit test suite.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) For more information on KUnit and unit tests in general, please refer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) to the KUnit documentation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) config DAMON_RECLAIM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) bool "Build DAMON-based reclaim (DAMON_RECLAIM)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) depends on DAMON_PADDR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) This builds the DAMON-based reclamation subsystem. It finds pages
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) that not accessed for a long time (cold) using DAMON and reclaim
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) those.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) This is suggested to be used as a proactive and lightweight
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) reclamation under light memory pressure, while the traditional page
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) scanning-based reclamation is used for heavy pressure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) endmenu