mm/damon: trivial fixups
Subsystems (5)
SeongJae Park
maintainercover mm/damon: trivial fixups
This patchset contains patches for trivial fixups of DAMON's documentation, MAINTAINERS section, and selftests.
SeongJae Park (8):
mm/damon/core: update kernel-doc comments for DAMOS action supports of
each DAMON operations set
mm/damon/core: update kernel-doc comments for DAMOS filters supports
of each DAMON operations set
Docs/mm/damon/index: mention DAMOS on the intro Docs/admin-guide/mm/damon/usage: update DAMOS actions/filters supports
of each DAMON operations set
Docs/mm/damon: add a maintainer-profile for DAMON MAINTAINERS/DAMON: link maintainer profile, git trees, and website selftests/damon/sysfs: hide expected write failures selftests/damon/debugfs_rm_non_contexts: hide expected write error
messages
Documentation/admin-guide/mm/damon/usage.rst | 41 ++++++++---- Documentation/mm/damon/index.rst | 22 ++++--- Documentation/mm/damon/maintainer-profile.rst | 62 +++++++++++++++++++ MAINTAINERS | 5 ++ include/linux/damon.h | 11 ++++ .../damon/debugfs_rm_non_contexts.sh | 2 +- tools/testing/selftests/damon/sysfs.sh | 2 +- 7 files changed, 122 insertions(+), 23 deletions(-) create mode 100644 Documentation/mm/damon/maintainer-profile.rst
Signature · 1 line
2.25.1
SeongJae Park
maintainerPATCH 1/8 mm/damon/core: update kernel-doc comments for DAMOS action supports of each DAMON operations set
Supports of each DAMOS action are up to DAMON operations set implementation in use, but not well mentioned on the kernel-doc comments. Add the comment.
--- include/linux/damon.h | 6 ++++++ 1 file changed, 6 insertions(+)
include/linux/damon.h +6 -0
@@ -91,6 +91,12 @@ struct damon_target {* @DAMOS_LRU_DEPRIO: Deprioritize the region on its LRU lists. * @DAMOS_STAT: Do nothing but count the stat. * @NR_DAMOS_ACTIONS: Total number of DAMOS actions +* +* The support of each action is up to running &struct damon_operations. +* &enum DAMON_OPS_VADDR and &enum DAMON_OPS_FVADDR supports all actions except +* &enum DAMOS_LRU_PRIO and &enum DAMOS_LRU_DEPRIO. &enum DAMON_OPS_PADDR +* supports only &enum DAMOS_PAGEOUT, &enum DAMOS_LRU_PRIO, &enum +* DAMOS_LRU_DEPRIO, and &DAMOS_STAT. */ enum damos_action {DAMOS_WILLNEED ,
Signature · 1 line
2.25.1
SeongJae Park
maintainerPATCH 2/8 mm/damon/core: update kernel-doc comments for DAMOS filters supports of each DAMON operations set
In reply to SeongJae ParkSupports of each DAMOS filter type are up to DAMON operations set implementation in use, but not well mentioned on the kernel-doc comments. Add the comment.
--- include/linux/damon.h | 5 +++++ 1 file changed, 5 insertions(+)
include/linux/damon.h +5 -0
@@ -227,6 +227,11 @@ struct damos_stat {* @DAMOS_FILTER_TYPE_ANON: Anonymous pages. * @DAMOS_FILTER_TYPE_MEMCG: Specific memcg's pages. * @NR_DAMOS_FILTER_TYPES: Number of filter types. +* +* The support of each filter type is up to running &struct damon_operations. +* &enum DAMON_OPS_PADDR is supporting all filter types, while +* &enum DAMON_OPS_VADDR and &enum DAMON_OPS_FVADDR are not supporting any +* filter types. */ enum damos_filter_type {DAMOS_FILTER_TYPE_ANON ,
Signature · 1 line
2.25.1
SeongJae Park
maintainerPATCH 3/8 Docs/mm/damon/index: mention DAMOS on the intro
In reply to SeongJae ParkWhat DAMON aims to do is not only access monitoring but efficient and effective access-aware system operations. And DAMon-based Operation Schemes (DAMOS) is the important feature of DAMON for the goal. Make the intro of DAMON documentation to emphasize the goal and mention DAMOS.
--- Documentation/mm/damon/index.rst | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)
Documentation/mm/damon/index.rst +13 -8
@@ -4,8 +4,9 @@ DAMON: Data Access MONitor ========================== -DAMON is a data access monitoring framework subsystem for the Linux kernel. -The core mechanisms of DAMON (refer to :doc:`design` for the detail) make it +DAMON is a Linux kernel subsystem that provides a framework for data access +monitoring and the monitoring results based system operations. The core +monitoring mechanisms of DAMON (refer to :doc:`design` for the detail) make it - *accurate* (the monitoring output is useful enough for DRAM level memory management; It might not appropriate for CPU Cache levels, though),
@@ -14,12 +15,16 @@ The core mechanisms of DAMON (refer to :doc:`design` for the detail) make it - *scalable* (the upper-bound of the overhead is in constant range regardless of the size of target workloads). -Using this framework, therefore, the kernel's memory management mechanisms can -make advanced decisions. Experimental memory management optimization works -that incurring high data accesses monitoring overhead could implemented again. -In user space, meanwhile, users who have some special workloads can write -personalized applications for better understanding and optimizations of their -workloads and systems. +Using this framework, therefore, the kernel can operate system in an +access-aware fashion. Because the features are also exposed to the user space, +users who have special information about their workloads can write personalized +applications for better understanding and optimizations of their workloads and +systems. + +For easier development of such systems, DAMON provides a feature called DAMOS +(DAMon-based Operation Schemes) in addition to the monitoring. Using the +feature, DAMON users in both kernel and user spaces can do access-aware system +operations with no code but simple configurations. .. toctree:: :maxdepth: 2
Signature · 1 line
2.25.1
SeongJae Park
maintainerPATCH 4/8 Docs/admin-guide/mm/damon/usage: update DAMOS actions/filters supports of each DAMON operations set
In reply to SeongJae ParkSupports of each DAMOS action and filters are up to DAMON operations set implementation, but it's not mentioned in detail on the documentation. Update the information on the usage document.
--- Documentation/admin-guide/mm/damon/usage.rst | 41 +++++++++++++------- 1 file changed, 28 insertions(+), 13 deletions(-)
Documentation/admin-guide/mm/damon/usage.rst +28 -13
@@ -279,14 +279,25 @@ The ``action`` file is for setting and getting what action you want to apply to memory regions having specific access pattern of the interest. The keywords that can be written to and read from the file and their meaning are as below. - - ``willneed``: Call ``madvise()`` for the region with ``MADV_WILLNEED`` - - ``cold``: Call ``madvise()`` for the region with ``MADV_COLD`` - - ``pageout``: Call ``madvise()`` for the region with ``MADV_PAGEOUT`` - - ``hugepage``: Call ``madvise()`` for the region with ``MADV_HUGEPAGE`` - - ``nohugepage``: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE`` +Note that support of each action depends on the running DAMON operations set +`implementation <sysfs_contexts>`. + + - ``willneed``: Call ``madvise()`` for the region with ``MADV_WILLNEED``. + Supported by ``vaddr`` and ``fvaddr`` operations set. + - ``cold``: Call ``madvise()`` for the region with ``MADV_COLD``. + Supported by ``vaddr`` and ``fvaddr`` operations set. + - ``pageout``: Call ``madvise()`` for the region with ``MADV_PAGEOUT``. + Supported by ``vaddr``, ``fvaddr`` and ``paddr`` operations set. + - ``hugepage``: Call ``madvise()`` for the region with ``MADV_HUGEPAGE``. + Supported by ``vaddr`` and ``fvaddr`` operations set. + - ``nohugepage``: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE``. + Supported by ``vaddr`` and ``fvaddr`` operations set. - ``lru_prio``: Prioritize the region on its LRU lists. + Supported by ``paddr`` operations set. - ``lru_deprio``: Deprioritize the region on its LRU lists. - - ``stat``: Do nothing but count the statistics + Supported by ``paddr`` operations set. + - ``stat``: Do nothing but count the statistics. + Supported by all operations sets. schemes/<N>/access_pattern/ ---------------------------
@@ -388,8 +399,8 @@ pages of all memory cgroups except ``/having_care_already``.:: echo /having_care_already > 1/memcg_path echo N > 1/matching -Note that filters could be ignored depend on the running DAMON operations set -`implementation <sysfs_contexts>`. +Note that filters are currently supported only when ``paddr`` +`implementation <sysfs_contexts>` is being used. .. _sysfs_schemes_stats:
@@ -618,11 +629,15 @@ The ``<action>`` is a predefined integer for memory management actions, which DAMON will apply to the regions having the target access pattern. The supported numbers and their meanings are as below. - - 0: Call ``madvise()`` for the region with ``MADV_WILLNEED`` - - 1: Call ``madvise()`` for the region with ``MADV_COLD`` - - 2: Call ``madvise()`` for the region with ``MADV_PAGEOUT`` - - 3: Call ``madvise()`` for the region with ``MADV_HUGEPAGE`` - - 4: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE`` + - 0: Call ``madvise()`` for the region with ``MADV_WILLNEED``. Ignored if + ``target`` is ``paddr``. + - 1: Call ``madvise()`` for the region with ``MADV_COLD``. Ignored if + ``target`` is ``paddr``. + - 2: Call ``madvise()`` for the region with ``MADV_PAGEOUT``. + - 3: Call ``madvise()`` for the region with ``MADV_HUGEPAGE``. Ignored if + ``target`` is ``paddr``. + - 4: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE``. Ignored if + ``target`` is ``paddr``. - 5: Do nothing but count the statistics Quota
Signature · 1 line
2.25.1
SeongJae Park
maintainerPATCH 5/8 Docs/mm/damon: add a maintainer-profile for DAMON
In reply to SeongJae ParkDocument the basic policies and expectations for DAMON development.
--- Documentation/mm/damon/index.rst | 1 + Documentation/mm/damon/maintainer-profile.rst | 62 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 Documentation/mm/damon/maintainer-profile.rst
Documentation/mm/damon/index.rst +1 -0
@@ -32,3 +32,4 @@ operations with no code but simple configurations. faq design api + maintainer-profile
Documentation/mm/damon/maintainer-profile.rst new file +62 -0
62 lines not on this page · raw message
Signature · 1 line
2.25.1
SeongJae Park
maintainerPATCH 6/8 MAINTAINERS/DAMON: link maintainer profile, git trees, and website
In reply to SeongJae ParkAdd links to below DAMON development related resource to DAMON section in MAINTAINERS file.
- The basic policies and expectations of DAMON development,
- DAMON development trees, and
- DAMON introduction website.
--- MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+)
MAINTAINERS +5 -0
@@ -5790,6 +5790,11 @@ M: SeongJae Park <[email protected]> L: [email protected] L: [email protected] S: Maintained +W: https://damonitor.github.io +P: Documentation/mm/damon/maintainer-profile.rst +T: git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm +T: quilt git://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new +T: git git://git.kernel.org/pub/scm/linux/kernel/git/sj/linux.git damon/next F: Documentation/ABI/testing/sysfs-kernel-mm-damon F: Documentation/admin-guide/mm/damon/ F: Documentation/mm/damon/
Signature · 1 line
2.25.1
SeongJae Park
maintainerPATCH 7/8 selftests/damon/sysfs: hide expected write failures
In reply to SeongJae ParkDAMON selftests for sysfs (sysfs.sh) tests if some writes to DAMON sysfs interface files fails as expected. It makes the test results noisy with the failure error message because it tests a number of such failures. Redirect the expected failure error messages to /dev/null to make the results clean.
--- tools/testing/selftests/damon/sysfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/damon/sysfs.sh +1 -1
@@ -24,7 +24,7 @@ ensure_write_fail() content=$2 reason=$3 - if echo "$content" > "$file" + if (echo "$content" > "$file") 2> /dev/null then echo "writing $content to $file succeed ($fail_reason)" echo "expected failure because $reason"
Signature · 1 line
2.25.1
SeongJae Park
maintainerPATCH 8/8 selftests/damon/debugfs_rm_non_contexts: hide expected write error messages
In reply to SeongJae ParkA selftest case for DAMON debugfs interface has a test for expected failure. To make the test output clean, hide the expected failure error message.
--- tools/testing/selftests/damon/debugfs_rm_non_contexts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/damon/debugfs_rm_non_contexts.sh +1 -1
@@ -10,7 +10,7 @@ dmesg -C for file in "$DBGFS/"* do - echo "$(basename "$f")" > "$DBGFS/rm_contexts" + (echo "$(basename "$f")" > "$DBGFS/rm_contexts") &> /dev/null if dmesg | grep -q BUG then dmesg
Signature · 1 line
2.25.1