Skip to contentSkip to conversation

mm/damon: let users report their data attribute findings

PATCH New SJ Park 3 participants 56 messages Nov 24

Subsystems (5)
lore
Share & tools
lore

SJ Park

author maintainer
#0 lore raw

v2 cover mm/damon: let users report their data attribute findings

TL;DR
=====

Build a system for letting DAMON-external entities report their data attribute findings to DAMON. Let users report their data attribute findings to DAMON using the report system.

When DAMON Extension Becomes Challenging
========================================

DAMON's probe based data attributes monitoring system allows flexible extension of it for new types of information. Such extensions are not always easy, though. That's because DAMON is collecting the information on its own worker threads, kdamonds. If the new information to extend for is not already stored in a data structure that kdamonds can read, the extension becomes difficult.

For example, extending DAMON for hugepage size of the given memory was straightforward. kdamonds can read that from folios. Extending DAMON for accessors or writes-only accesses is challenging because there is no existing easy way to get that information from arbitrary threads like kdamonds.

Extending DAMON for information that is not already available to kdamonds requires two works. Finding DAMON-external kernel components that already have the information. And modifying it to pass the information to DAMON. Finding and modifying the components inherently need to be done for each of such extensions. Building a universal way to report the information to DAMON could make it much easier.

Modifying the component would be particularly challenging and even controversial depending on each case. Some components wouldn't want to add a hacky change only for DAMON. Having the universal report system that is well maintained will be useful at convincing the component, too.

User Information
================

Users sometimes know some data attribute information more than what the kernel can know. They could know frequently accessed data. They could know that because they have access to the source code of the workload. They could know that using non-DAMON kernel features. They could know that from some special tools and hardware.

DAMON is not only for monitoring but also operations. DAMON finds operation targets based on only its self monitoring results, though. Letting users report their data attribute information allows more flexible and effective control of the DAMON operations. Users can make DAMON to find operation targets based on both its self monitoring and user-provided reports.

DAMON is not providing such ways to let users report their information, though.

Report System and User Report Support
=====================================

DAMON lacks efficient DAMON-external information report system and user report support. Fill the gap.

Introduce a system to report information from kdamond-external entities to DAMON. Extend DAMON to monitor those reported information. Build a user interface for letting users report their findings.

Data Attribute Report System
============================

Introduce a system to report information from kdamond-external entities to DAMON. The report system let any kernel components in any context including NMI context pass their data attribute finding to DAMON as a report.

The system provides a data structure for such reports. Using the report data structure, a flexible data attribute information for a given memory can be built. The data structure also embeds a field for the type of the report. The report producer can specify what data attribute type the report is providing, using the field.

The system exposes an API function, damon_submit_report(), for submitting the report of the data type to DAMON. The submit function can be called from any context including NMI context.

DAMON Probe for Reports
=======================

Extend the DAMON probe filter to connect the report system with the existing monitoring part of DAMON. Introduce a new DAMON probe filter type, report. When the type is "report", it receives the report type argument. Filters of the type match to a given memory if a report of the given type for the memory is made in the last sampling interval. Update DAMON sysfs ABI for probe filters setup to support the new filter type and the new argument for the report type.

User Report Support
===================

Let users report their findings. Introduce a report type for the users provided report. Extend DAMON sysfs ABI to let users manually configure and submit such reports one by one. Users can specify for what memory the report is made, with an arbitrary address range.

Using the new support, users can control DAMON using their own information. They can control DAMON using their information as only a source, or an additional source to existing ones. For example, they can let DAMON do page table accessed-bit based access monitoring. In addition to that, if they know some hot data that might not be found by the page table information, they can let DAMON know the hot data using the report system.

Ongoing and Future Works
========================

This is a part of the "beyond page table accessed-bit DAMON extension" project [1] milestone 2. This patch series provides the initial and essential part of the data attribute report system.

I will implement a cpu cycle sampling based extension based on the report system that is implemented by this series. It is for providing accessor and type-aware access monitoring. Using it, users will be able to monitor access for given CPUs, tasks and types (read and/or write) of accesses.

While doing that, the report system will also be advanced in a way that can be used for reports that are not manually produced by the user but by the kernel or hardware itself. That will be the completion of the second milestone of the parent project. After that, people will be able to build more extensions including AMD IBS-like hardware based monitoring, using the advanced report system.

Patches Sequence
================

Introduce the data attribute report system with the first eleven patches (patches 1-11). Define the data structure for each report and expose via DAMON core API, via patch 1. Implement an internal data structure for saving the reports, struct damon_report, via patch 2. Introduce another DAMON core API function for submitting each report, damon_submit_report(), via patch 3. Implement reports/producers/ sysfs directory next to the kdamonds/ directory, for controlling report producers, via patches 4-8. Update the design, the usage and the ABI documents for the report system, with patches 9-11.

Extend the DAMON probe filter for the reports, with the following eight patches (patches 12-19). Introduce a new filter type, REPORT_MADE, which matches if a report for the probing memory is made in last sampling interval, via patch 12. Implement and expose a DAMON core API function, damon_report_exist(), that returns if a report of given condition exist in the report queue, via patch 13. Add support of the new filter type in paddr operation set, via patch 14. Implement sysfs files for setting the new type of filter, via patches 15 and 16. Update the design, the usage and the ABI documents for the new filter type and its user interface, via patches 17-19.

Finally, implement user report support with the subsequent eight patches (patches 20-27). Introduce a new report type DAMON core API, USER_REPORT, via patch 20. Add a user keyword for the new report type to sysfs files, via patch 21. Implement sysfs files for manually generating and submitting user reports, via patches 22 and 23. Add a simple selftest for new sysfs files, via patch 24. Update the design, the usage and the ABI documents for the new report type and its user interface, via patches 25-27.

References
==========

[1] Beyond page table accessed bits DAMON extension roadmap:

    https://lore.kernel.org/[email protected]/

Tests
=====

Confirmed the user report is working like below.

Submit report for [5 GiB, 6 GiB) address range for every 5 milliseconds.

    # cd /sys/kernel/mm/damon/admin/reports/producers/
    # echo 1 > nr_producers
    # echo $((5*1024*1024)) > 0/addr_start
    # echo $((6*1024*1024)) > 0/addr_end
    # echo on > 0/producer_state
    # while true; do echo submit > producer_state ; sleep 0.005; done

On another terminal session, start DAMON in the attribute only monitoring mode, with user_report report_made probe filter type, using DAMON user-space tool, damo [1].

    $ sudo ./damo start --probe \
            --probe_filter allow report_made user_report \
            --probe_weight 1

Show the user report for the [5 GiB, 6 GiB) address range is detected:

    $ sudo ./damo report attrs --sort_regions_by address
    heatmap:
    00000000000000000000000000000000000000000000000000069999999995111111100000000000
    # min/max temperatures: -790,000,000, 80,001,900, column size: 99.800
    MiB
    probe allow report_made user_report (weight: 1)
    intervals: sample 5 ms aggr 100 ms (max probe hits 20)
    #   size         address       age           probe_hits
    0   4.678 GiB    4.000 KiB     7.900 s       0
    1   329.582 MiB  4.678 GiB     7.400 s       0
    2   1024.000 MiB  5.000 GiB     800 ms        19
    3   792.809 MiB  6.000 GiB     6.900 s       0
    4   1.023 GiB    6.774 GiB     7.900 s       0
    memory bw estimate: 0 B per second
    total size: 7.797 GiB
    record DAMON intervals: sample 5 ms, aggr 100 ms

the region of index 2 is the region for the [5 GiB, 6 GiB) address range. DAMON received the user report for nearly all sampling intervals, and therefore shows its probe_hits as 19.

Stop user report submissions using Ctrl-C on the report submit terminal session. Show DAMON monitoring results showing no more reports are submitted.

    $ sudo ./damo report attrs --sort_regions_by address
    heatmap:
    00000000000000000000000000000000000000000000000366666668999999822222221000000000
    # min/max temperatures: -1,740,000,000, -740,000,000, column size:
    99.800 MiB
    probe allow report_made user_report (weight: 1)
    intervals: sample 5 ms aggr 100 ms (max probe hits 20)
    #   size         address       age           probe_hits
    0   1.551 GiB    4.000 KiB     17.400 s      0
    1   1.536 GiB    1.551 GiB     17.300 s      0
    2   788.715 MiB  3.087 GiB     17.200 s      0
    3   797.793 MiB  3.857 GiB     16.800 s      0
    4   764.137 MiB  4.636 GiB     10.300 s      0
    5   768.867 MiB  5.382 GiB     7.400 s       0
    6   774.043 MiB  6.133 GiB     14.500 s      0
    7   797.250 MiB  6.889 GiB     17 s          0
    8   132.488 MiB  7.667 GiB     17.400 s      0
    memory bw estimate: 0 B per second
    total size: 7.797 GiB
    record DAMON intervals: sample 5 ms, aggr 100 ms

No more probe_hits for [5 GiB, 6 GiB) address range is shown, since the user report is stopped..

[1] https://github.com/damonitor/damo

Changes from v1
- v1: https://lore.kernel.org/[email protected]
- Convert probing address from phys_addr_t to unsigned long, using addr_unit.
- Collect R-b: from Aveline and Lian.
- Rebase to the latest mm-new.
Changes from RFC v2
- RFC v2: https://lore.kernel.org/[email protected]
- Add test results to the cover letter.
- Rebase to the latest mm-new.
- Drop RFC tag.
Changes from RFC
- RFC: https://lore.kernel.org/[email protected]
- Add parent project roadmap link in the cover letter.
- Fixup kernel-doc comments.
- Mark damon_report_queue as static.
- Destroy damon_region_cache for queue setup failure.
- Fix out-of-bound writing in damon_submit_report().
- Setup damon_filter->report_type in damon_commit_filters() path, too.
- Fix wrong index referencing in damon_report_exist().
- Rebase to the latest mm-new.
Changes from RFC v0
- RFC v0: https://lore.kernel.org/[email protected]
- Implement the code.
- Update the documentation to be less like Cover letter.
- Rebase to the latest mm-new.

SJ Park (27):
mm/damon/api: introduce struct damon_report
mm/damon/core: implement data attribute report queue mm/damon/core: introduce damon_submit_report() mm/damon/sysfs: add admin/reports/ directory mm/damon/sysfs: add reports/producers/ directory mm/damon/sysfs: add producers/nr_producers file mm/damon/sysfs: implement report producer directory mm/damon/sysfs: implement report producer type and state files Docs/mm/damon/design: update for report system Docs/admin-guide/mm/damon/usage: update for report producer sysfs Docs/ABI/damon: update for report producer sysfs files mm/damon/core: introduce DAMON_FILTER_TYPE_REPORT_MADE mm/damon/core: introduce damon_report_exist() mm/damon/paddr: support REPORT_MADE type probe filter mm/damon/sysfs: add filter_report_type file under probe filter
directory
mm/damon/sysfs: support REPORT_MADE type probe filter setup Docs/mm/damon/design: update for report_made probe filter type Docs/admin-guide/mm/damon/usage: update for REPORT_MADE probe filter Docs/ABI/damon: update for REPORT_MADE probe filter mm/damon/api: introduce user_report report type mm/damon/sysfs: add user_report support for report type input mm/damon/sysfs: implement report producer addr_{start,end} files mm/damon/sysfs: implement submit command for report producer selftests/damon/sysfs.sh: add basic tests for admin/reports/ Docs/mm/damon/design: update for user report support Docs/admin-guide/mm/damon/usage: update for user_report report support Docs/ABI/damon: update for user_report report support

 .../ABI/testing/sysfs-kernel-mm-damon         |  43 ++
 Documentation/admin-guide/mm/damon/usage.rst  |  50 ++-
 Documentation/mm/damon/design.rst             |  45 ++
 include/linux/damon.h                         |  33 ++
 mm/damon/core.c                               | 113 ++++-
 mm/damon/paddr.c                              |  17 +-
 mm/damon/sysfs.c                              | 420 +++++++++++++++++-
 tools/testing/selftests/damon/sysfs.sh        |  52 +++
 8 files changed, 763 insertions(+), 10 deletions(-)

base-commit: 8a564d37d55547b5884c310776de062e6add5ef3

Signature · 1 line
2.47.3
author maintainer
#1 lore raw

PATCH v2 1/27 mm/damon/api: introduce struct damon_report

Define a struct for data attribute report. The struct provides public fields for the type and the memory address range. The type field represents the type of the report itself. The address range is for the memory of the reporting data. Data attribute producers can format their report using those fields.

It also has a private field representing when the report is submitted.

---
 include/linux/damon.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
include/linux/damon.h +21 -0
index 3aff5c525132b..2520c036306f3 100644
@@ -757,6 +757,27 @@ struct damon_intervals_goal {
 	unsigned long max_sample_us;
 };
 
+/**
+ * enum damon_report_type - Type of &struct damon_report.
+ */
+enum damon_report_type {
+	NR_DAMON_REPORT_TYPES,
+};
+
+/**
+ * struct damon_report - Data attribute report information.
+ *
+ * @type:	Type of the report.
+ * @addr_range:	The address range of the memory to report for.
+ */
+struct damon_report {
+	enum damon_report_type type;
+	struct damon_addr_range addr_range;
+/* private: */
+	/* when this report is generated */
+	unsigned long jiffies;
+};
+
 /**
  * enum damon_prep_action - DAMON probing preparation action.
  *
Signature · 1 line
2.47.3
maintainer tree notice
#2 lore raw

+ mm-damon-api-introduce-struct-damon_report.patch added to mm-new branch

The patch titled Subject: mm/damon/api: introduce struct damon_report has been added to the -mm mm-new branch. Its filename is mm-damon-api-introduce-struct-damon_report.patch

The patch titled
Subject: mm/damon/api: introduce struct damon_report
has been added to the -mm mm-new branch. Its filename is
mm-damon-api-introduce-struct-damon_report.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-api-introduce-struct-damon_report.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: mm/damon/api: introduce struct damon_report
Date: Tue, 24 Nov 2026 07:36:07 -0800

Patch series "mm/damon: let users report their data attribute findings", v2.

TL;DR
=====

Build a system for letting DAMON-external entities report their data attribute findings to DAMON. Let users report their data attribute findings to DAMON using the report system.

When DAMON Extension Becomes Challenging
========================================

DAMON's probe based data attributes monitoring system allows flexible extension of it for new types of information. Such extensions are not always easy, though. That's because DAMON is collecting the information on its own worker threads, kdamonds. If the new information to extend for is not already stored in a data structure that kdamonds can read, the extension becomes difficult.

For example, extending DAMON for hugepage size of the given memory was straightforward. kdamonds can read that from folios. Extending DAMON for accessors or writes-only accesses is challenging because there is no existing easy way to get that information from arbitrary threads like kdamonds.

Extending DAMON for information that is not already available to kdamonds requires two works. Finding DAMON-external kernel components that already have the information. And modifying it to pass the information to DAMON. Finding and modifying the components inherently need to be done for each of such extensions. Building a universal way to report the information to DAMON could make it much easier.

Modifying the component would be particularly challenging and even controversial depending on each case. Some components wouldn't want to add a hacky change only for DAMON. Having the universal report system that is well maintained will be useful at convincing the component, too.

User Information
================

Users sometimes know some data attribute information more than what the kernel can know. They could know frequently accessed data. They could know that because they have access to the source code of the workload. They could know that using non-DAMON kernel features. They could know that from some special tools and hardware.

DAMON is not only for monitoring but also operations. DAMON finds operation targets based on only its self monitoring results, though. Letting users report their data attribute information allows more flexible and effective control of the DAMON operations. Users can make DAMON to find operation targets based on both its self monitoring and user-provided reports.

DAMON is not providing such ways to let users report their information, though.

Report System and User Report Support
=====================================

DAMON lacks efficient DAMON-external information report system and user report support. Fill the gap.

Introduce a system to report information from kdamond-external entities to DAMON. Extend DAMON to monitor those reported information. Build a user interface for letting users report their findings.

Data Attribute Report System
============================

Introduce a system to report information from kdamond-external entities to DAMON. The report system let any kernel components in any context including NMI context pass their data attribute finding to DAMON as a report.

The system provides a data structure for such reports. Using the report data structure, a flexible data attribute information for a given memory can be built. The data structure also embeds a field for the type of the report. The report producer can specify what data attribute type the report is providing, using the field.

The system exposes an API function, damon_submit_report(), for submitting the report of the data type to DAMON. The submit function can be called from any context including NMI context.

DAMON Probe for Reports
=======================

Extend the DAMON probe filter to connect the report system with the existing monitoring part of DAMON. Introduce a new DAMON probe filter type, report. When the type is "report", it receives the report type argument. Filters of the type match to a given memory if a report of the given type for the memory is made in the last sampling interval. Update DAMON sysfs ABI for probe filters setup to support the new filter type and the new argument for the report type.

User Report Support
===================

Let users report their findings. Introduce a report type for the users provided report. Extend DAMON sysfs ABI to let users manually configure and submit such reports one by one. Users can specify for what memory the report is made, with an arbitrary address range.

Using the new support, users can control DAMON using their own information. They can control DAMON using their information as only a source, or an additional source to existing ones. For example, they can let DAMON do page table accessed-bit based access monitoring. In addition to that, if they know some hot data that might not be found by the page table information, they can let DAMON know the hot data using the report system.

Ongoing and Future Works
========================

This is a part of the "beyond page table accessed-bit DAMON extension" project [1] milestone 2. This patch series provides the initial and essential part of the data attribute report system.

I will implement a cpu cycle sampling based extension based on the report system that is implemented by this series. It is for providing accessor and type-aware access monitoring. Using it, users will be able to monitor access for given CPUs, tasks and types (read and/or write) of accesses.

While doing that, the report system will also be advanced in a way that can be used for reports that are not manually produced by the user but by the kernel or hardware itself. That will be the completion of the second milestone of the parent project. After that, people will be able to build more extensions including AMD IBS-like hardware based monitoring, using the advanced report system.

Patches Sequence
================

Introduce the data attribute report system with the first eleven patches (patches 1-11). Define the data structure for each report and expose via DAMON core API, via patch 1. Implement an internal data structure for saving the reports, struct damon_report, via patch 2. Introduce another DAMON core API function for submitting each report, damon_submit_report(), via patch 3. Implement reports/producers/ sysfs directory next to the kdamonds/ directory, for controlling report producers, via patches 4-8. Update the design, the usage and the ABI documents for the report system, with patches 9-11.

Extend the DAMON probe filter for the reports, with the following eight patches (patches 12-19). Introduce a new filter type, REPORT_MADE, which matches if a report for the probing memory is made in last sampling interval, via patch 12. Implement and expose a DAMON core API function, damon_report_exist(), that returns if a report of given condition exist in the report queue, via patch 13. Add support of the new filter type in paddr operation set, via patch 14. Implement sysfs files for setting the new type of filter, via patches 15 and 16. Update the design, the usage and the ABI documents for the new filter type and its user interface, via patches 17-19.

Finally, implement user report support with the subsequent eight patches (patches 20-27). Introduce a new report type DAMON core API, USER_REPORT, via patch 20. Add a user keyword for the new report type to sysfs files, via patch 21. Implement sysfs files for manually generating and submitting user reports, via patches 22 and 23. Add a simple selftest for new sysfs files, via patch 24. Update the design, the usage and the ABI documents for the new report type and its user interface, via patches 25-27.

References
==========

[1] Beyond page table accessed bits DAMON extension roadmap:

    https://lore.kernel.org/[email protected]/

Tests
=====

Confirmed the user report is working like below.

Submit report for [5 GiB, 6 GiB) address range for every 5 milliseconds.

    # cd /sys/kernel/mm/damon/admin/reports/producers/
    # echo 1 > nr_producers
    # echo $((5*1024*1024)) > 0/addr_start
    # echo $((6*1024*1024)) > 0/addr_end
    # echo on > 0/producer_state
    # while true; do echo submit > producer_state ; sleep 0.005; done

On another terminal session, start DAMON in the attribute only monitoring mode, with user_report report_made probe filter type, using DAMON user-space tool, damo [1].

    $ sudo ./damo start --probe \
            --probe_filter allow report_made user_report \
            --probe_weight 1

Show the user report for the [5 GiB, 6 GiB) address range is detected:

    $ sudo ./damo report attrs --sort_regions_by address
    heatmap:
    00000000000000000000000000000000000000000000000000069999999995111111100000000000
    # min/max temperatures: -790,000,000, 80,001,900, column size: 99.800
    MiB
    probe allow report_made user_report (weight: 1)
    intervals: sample 5 ms aggr 100 ms (max probe hits 20)
    #   size         address       age           probe_hits
    0   4.678 GiB    4.000 KiB     7.900 s       0
    1   329.582 MiB  4.678 GiB     7.400 s       0
    2   1024.000 MiB  5.000 GiB     800 ms        19
    3   792.809 MiB  6.000 GiB     6.900 s       0
    4   1.023 GiB    6.774 GiB     7.900 s       0
    memory bw estimate: 0 B per second
    total size: 7.797 GiB
    record DAMON intervals: sample 5 ms, aggr 100 ms

the region of index 2 is the region for the [5 GiB, 6 GiB) address range. DAMON received the user report for nearly all sampling intervals, and therefore shows its probe_hits as 19.

Stop user report submissions using Ctrl-C on the report submit terminal session. Show DAMON monitoring results showing no more reports are submitted.

    $ sudo ./damo report attrs --sort_regions_by address
    heatmap:
    00000000000000000000000000000000000000000000000366666668999999822222221000000000
    # min/max temperatures: -1,740,000,000, -740,000,000, column size:
    99.800 MiB
    probe allow report_made user_report (weight: 1)
    intervals: sample 5 ms aggr 100 ms (max probe hits 20)
    #   size         address       age           probe_hits
    0   1.551 GiB    4.000 KiB     17.400 s      0
    1   1.536 GiB    1.551 GiB     17.300 s      0
    2   788.715 MiB  3.087 GiB     17.200 s      0
    3   797.793 MiB  3.857 GiB     16.800 s      0
    4   764.137 MiB  4.636 GiB     10.300 s      0
    5   768.867 MiB  5.382 GiB     7.400 s       0
    6   774.043 MiB  6.133 GiB     14.500 s      0
    7   797.250 MiB  6.889 GiB     17 s          0
    8   132.488 MiB  7.667 GiB     17.400 s      0
    memory bw estimate: 0 B per second
    total size: 7.797 GiB
    record DAMON intervals: sample 5 ms, aggr 100 ms

No more probe_hits for [5 GiB, 6 GiB) address range is shown, since the user report is stopped..

This patch (of 27):

Define a struct for data attribute report. The struct provides public fields for the type and the memory address range. The type field represents the type of the report itself. The address range is for the memory of the reporting data. Data attribute producers can format their report using those fields.

It also has a private field representing when the report is submitted.

 include/linux/damon.h |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
include/linux/damon.h renamed from include/linux/damon.h~mm-damon-api-introduce-struct-damon_report +21 -0
@@ -758,6 +758,27 @@ struct damon_intervals_goal {
 };
 
 /**
+ * enum damon_report_type - Type of &struct damon_report.
+ */
+enum damon_report_type {
+	NR_DAMON_REPORT_TYPES,
+};
+
+/**
+ * struct damon_report - Data attribute report information.
+ *
+ * @type:	Type of the report.
+ * @addr_range:	The address range of the memory to report for.
+ */
+struct damon_report {
+	enum damon_report_type type;
+	struct damon_addr_range addr_range;
+/* private: */
+	/* when this report is generated */
+	unsigned long jiffies;
+};
+
+/**
  * enum damon_prep_action - DAMON probing preparation action.
  *
  * @DAMON_PREP_SET_PGIDLE:	Set the probing memory as idle page.

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#3 lore raw

PATCH v2 2/27 mm/damon/core: implement data attribute report queue

In reply to SJ Park

Implement DAMON core internal data structure for queuing received data attribute reports. Initialize the queue for up to 1,000 reports, inside the DAMON init routine. Destroy damon_region_cache and reset the pointer for the queue setup failures.

---
 mm/damon/core.c | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)
mm/damon/core.c +30 -1
index 649a4ac968abf..8293b69169856 100644
@@ -2337,6 +2337,25 @@ int damos_walk(struct damon_ctx *ctx, struct damos_walk_control *control)
 	return 0;
 }
 
+/*
+ * struct damon_report_queue - &struct damon_report queue.
+ *
+ * @lock:	Represent if this queue is being used by someone.
+ * @tail:	Tail of the queue.
+ * @size:	Size of the queue.
+ * @nr_reports:	Number of reports stored in the queue.
+ * @reports:	Array of &struct damon_report.
+ */
+struct damon_report_queue {
+	atomic_t lock;
+	unsigned int tail;
+	unsigned int size;
+	unsigned int nr_reports;
+	struct damon_report *reports;
+};
+
+static struct damon_report_queue damon_report_queue;
+
 /*
  * Reset the aggregated monitoring results ('nr_accesses' of each region).
  */
@@ -4323,7 +4342,7 @@ void damon_update_region_access_rate(struct damon_region *r, bool accessed)
  */
 bool damon_initialized(void)
 {
-	return damon_region_cache != NULL;
+	return damon_region_cache;
 }
 
 static int __init damon_init(void)
@@ -4334,6 +4353,16 @@ static int __init damon_init(void)
 		return -ENOMEM;
 	}
 
+	damon_report_queue.size = 1000;
+	damon_report_queue.reports = kmalloc_objs(*damon_report_queue.reports,
+			1000, GFP_KERNEL);
+	if (!damon_report_queue.reports) {
+		pr_err("report queue alloc fail\n");
+		kmem_cache_destroy(damon_region_cache);
+		damon_region_cache = NULL;
+		return -ENOMEM;
+	}
+
 	return 0;
 }
 
Signature · 1 line
2.47.3
maintainer tree notice
#4 lore raw

+ mm-damon-core-implement-data-attribute-report-queue.patch added to mm-new branch

The patch titled Subject: mm/damon/core: implement data attribute report queue has been added to the -mm mm-new branch. Its filename is mm-damon-core-implement-data-attribute-report-queue.patch

The patch titled
Subject: mm/damon/core: implement data attribute report queue
has been added to the -mm mm-new branch. Its filename is
mm-damon-core-implement-data-attribute-report-queue.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-core-implement-data-attribute-report-queue.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: mm/damon/core: implement data attribute report queue
Date: Tue, 24 Nov 2026 07:36:08 -0800

Implement DAMON core internal data structure for queuing received data attribute reports. Initialize the queue for up to 1,000 reports, inside the DAMON init routine. Destroy damon_region_cache and reset the pointer for the queue setup failures.

 mm/damon/core.c |   31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)
mm/damon/core.c renamed from mm/damon/core.c~mm-damon-core-implement-data-attribute-report-queue +30 -1
@@ -2338,6 +2338,25 @@ int damos_walk(struct damon_ctx *ctx, st
 }
 
 /*
+ * struct damon_report_queue - &struct damon_report queue.
+ *
+ * @lock:	Represent if this queue is being used by someone.
+ * @tail:	Tail of the queue.
+ * @size:	Size of the queue.
+ * @nr_reports:	Number of reports stored in the queue.
+ * @reports:	Array of &struct damon_report.
+ */
+struct damon_report_queue {
+	atomic_t lock;
+	unsigned int tail;
+	unsigned int size;
+	unsigned int nr_reports;
+	struct damon_report *reports;
+};
+
+static struct damon_report_queue damon_report_queue;
+
+/*
  * Reset the aggregated monitoring results ('nr_accesses' of each region).
  */
 static void kdamond_reset_aggregated(struct damon_ctx *c)
@@ -4323,7 +4342,7 @@ void damon_update_region_access_rate(str
  */
 bool damon_initialized(void)
 {
-	return damon_region_cache != NULL;
+	return damon_region_cache;
 }
 
 static int __init damon_init(void)
@@ -4334,6 +4353,16 @@ static int __init damon_init(void)
 		return -ENOMEM;
 	}
 
+	damon_report_queue.size = 1000;
+	damon_report_queue.reports = kmalloc_objs(*damon_report_queue.reports,
+			1000, GFP_KERNEL);
+	if (!damon_report_queue.reports) {
+		pr_err("report queue alloc fail\n");
+		kmem_cache_destroy(damon_region_cache);
+		damon_region_cache = NULL;
+		return -ENOMEM;
+	}
+
 	return 0;
 }
 

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#5 lore raw

PATCH v2 3/27 mm/damon/core: introduce damon_submit_report()

In reply to SJ Park

Implement and expose a new DAMON API function for submitting a data attribute report. Any kernel component in any context including NMI context can use it to report their finding of data attribute information for a given memory.

The function copies the content of the report into the DAMON-internal report queue. The copy is done in a ring buffer-like manner, without being blocked for consumption. As a result, the queue keeps the latest reports up to its capacity.

Use simple CAS-based try-locking. If any parallel submission is detected, simply forgive the submission.

---
 include/linux/damon.h |  2 ++
 mm/damon/core.c       | 30 ++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)
include/linux/damon.h +2 -0
index 2520c036306f3..30c0ab8d88c2c 100644
@@ -1193,6 +1193,8 @@ int damon_kdamond_pid(struct damon_ctx *ctx);
 int damon_call(struct damon_ctx *ctx, struct damon_call_control *control);
 int damos_walk(struct damon_ctx *ctx, struct damos_walk_control *control);
 
+int damon_submit_report(struct damon_report *report);
+
 int damon_set_region_system_rams_default(struct damon_target *t,
 				unsigned long *start, unsigned long *end,
 				unsigned long addr_unit,
mm/damon/core.c +30 -0
index 8293b69169856..ae6ef43e5653f 100644
@@ -2356,6 +2356,36 @@ struct damon_report_queue {
 
 static struct damon_report_queue damon_report_queue;
 
+/**
+ * damon_submit_report() - Enqueue a given report to DAMON internal buffer.
+ * @report:	The report to enqueue.
+ *
+ * This function can be called from any context including the NMI context.
+ *
+ * Return: 0 on success, negative error code otherwise.
+ */
+int damon_submit_report(struct damon_report *report)
+{
+	struct damon_report_queue *queue;
+	int lock_old_val;
+
+	queue = &damon_report_queue;
+	report->jiffies = jiffies;
+	lock_old_val = atomic_cmpxchg(&queue->lock, 0, 1);
+	if (lock_old_val)
+		return -EBUSY;
+
+	if (queue->tail == queue->size)
+		queue->tail = 0;
+	queue->reports[queue->tail] = *report;
+	queue->tail++;
+	if (queue->nr_reports < queue->size)
+		queue->nr_reports++;
+	/* cmpxchg is known to be faster than xchg */
+	atomic_cmpxchg(&queue->lock, 1, 0);
+	return 0;
+}
+
 /*
  * Reset the aggregated monitoring results ('nr_accesses' of each region).
  */
Signature · 1 line
2.47.3
maintainer tree notice
#6 lore raw

+ mm-damon-core-introduce-damon_submit_report.patch added to mm-new branch

The patch titled Subject: mm/damon/core: introduce damon_submit_report() has been added to the -mm mm-new branch. Its filename is mm-damon-core-introduce-damon_submit_report.patch

The patch titled
Subject: mm/damon/core: introduce damon_submit_report()
has been added to the -mm mm-new branch. Its filename is
mm-damon-core-introduce-damon_submit_report.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-core-introduce-damon_submit_report.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: mm/damon/core: introduce damon_submit_report()
Date: Tue, 24 Nov 2026 07:36:09 -0800

Implement and expose a new DAMON API function for submitting a data attribute report. Any kernel component in any context including NMI context can use it to report their finding of data attribute information for a given memory.

The function copies the content of the report into the DAMON-internal report queue. The copy is done in a ring buffer-like manner, without being blocked for consumption. As a result, the queue keeps the latest reports up to its capacity.

Use simple CAS-based try-locking. If any parallel submission is detected, simply forgive the submission.

 include/linux/damon.h |    2 ++
 mm/damon/core.c       |   30 ++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)
include/linux/damon.h renamed from include/linux/damon.h~mm-damon-core-introduce-damon_submit_report +2 -0
@@ -1193,6 +1193,8 @@ int damon_kdamond_pid(struct damon_ctx *
 int damon_call(struct damon_ctx *ctx, struct damon_call_control *control);
 int damos_walk(struct damon_ctx *ctx, struct damos_walk_control *control);
 
+int damon_submit_report(struct damon_report *report);
+
 int damon_set_region_system_rams_default(struct damon_target *t,
 				unsigned long *start, unsigned long *end,
 				unsigned long addr_unit,
mm/damon/core.c renamed from mm/damon/core.c~mm-damon-core-introduce-damon_submit_report +30 -0
@@ -2356,6 +2356,36 @@ struct damon_report_queue {
 
 static struct damon_report_queue damon_report_queue;
 
+/**
+ * damon_submit_report() - Enqueue a given report to DAMON internal buffer.
+ * @report:	The report to enqueue.
+ *
+ * This function can be called from any context including the NMI context.
+ *
+ * Return: 0 on success, negative error code otherwise.
+ */
+int damon_submit_report(struct damon_report *report)
+{
+	struct damon_report_queue *queue;
+	int lock_old_val;
+
+	queue = &damon_report_queue;
+	report->jiffies = jiffies;
+	lock_old_val = atomic_cmpxchg(&queue->lock, 0, 1);
+	if (lock_old_val)
+		return -EBUSY;
+
+	if (queue->tail == queue->size)
+		queue->tail = 0;
+	queue->reports[queue->tail] = *report;
+	queue->tail++;
+	if (queue->nr_reports < queue->size)
+		queue->nr_reports++;
+	/* cmpxchg is known to be faster than xchg */
+	atomic_cmpxchg(&queue->lock, 1, 0);
+	return 0;
+}
+
 /*
  * Reset the aggregated monitoring results ('nr_accesses' of each region).
  */

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#7 lore raw

PATCH v2 4/27 mm/damon/sysfs: add admin/reports/ directory

In reply to SJ Park

Add a new sysfs directory, reports/, as a place holder for sysfs files that will be used for controlling the data attribute report system. Put the directory under the admin/ directory, next to kdamonds/ directory.

---
 mm/damon/sysfs.c | 63 +++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 59 insertions(+), 4 deletions(-)
mm/damon/sysfs.c +59 -4
index 779c98205a94b..76850a4b5b5a7 100644
@@ -2979,6 +2979,38 @@ static const struct kobj_type damon_sysfs_kdamonds_ktype = {
 	.default_groups = damon_sysfs_kdamonds_groups,
 };
 
+/* reports dir */
+
+struct damon_sysfs_reports {
+	struct kobject kobj;
+};
+
+static struct damon_sysfs_reports *damon_sysfs_reports_alloc(void)
+{
+	return kzalloc_obj(struct damon_sysfs_reports);
+}
+
+static int damon_sysfs_reports_add_dirs(struct damon_sysfs_reports *reports)
+{
+	return 0;
+}
+
+static void damon_sysfs_reports_release(struct kobject *kobj)
+{
+	kfree(container_of(kobj, struct damon_sysfs_reports, kobj));
+}
+
+static struct attribute *damon_sysfs_reports_attrs[] = {
+	NULL,
+};
+ATTRIBUTE_GROUPS(damon_sysfs_reports);
+
+static const struct kobj_type damon_sysfs_reports_ktype = {
+	.release = damon_sysfs_reports_release,
+	.sysfs_ops = &kobj_sysfs_ops,
+	.default_groups = damon_sysfs_reports_groups,
+};
+
 /*
  * damon user interface directory
  */
@@ -2986,6 +3018,7 @@ static const struct kobj_type damon_sysfs_kdamonds_ktype = {
 struct damon_sysfs_ui_dir {
 	struct kobject kobj;
 	struct damon_sysfs_kdamonds *kdamonds;
+	struct damon_sysfs_reports *reports;
 };
 
 static struct damon_sysfs_ui_dir *damon_sysfs_ui_dir_alloc(void)
@@ -2996,6 +3029,7 @@ static struct damon_sysfs_ui_dir *damon_sysfs_ui_dir_alloc(void)
 static int damon_sysfs_ui_dir_add_dirs(struct damon_sysfs_ui_dir *ui_dir)
 {
 	struct damon_sysfs_kdamonds *kdamonds;
+	struct damon_sysfs_reports *reports;
 	int err;
 
 	kdamonds = damon_sysfs_kdamonds_alloc();
@@ -3005,11 +3039,32 @@ static int damon_sysfs_ui_dir_add_dirs(struct damon_sysfs_ui_dir *ui_dir)
 	err = kobject_init_and_add(&kdamonds->kobj,
 			&damon_sysfs_kdamonds_ktype, &ui_dir->kobj,
 			"kdamonds");
-	if (err) {
-		kobject_put(&kdamonds->kobj);
-		return err;
-	}
+	if (err)
+		goto put_kdamonds_out;
 	ui_dir->kdamonds = kdamonds;
+
+	reports = damon_sysfs_reports_alloc();
+	if (!reports) {
+		err = -ENOMEM;
+		goto put_kdamonds_out;
+	}
+	ui_dir->reports = reports;
+
+	err = kobject_init_and_add(&reports->kobj, &damon_sysfs_reports_ktype,
+			&ui_dir->kobj, "reports");
+	if (err)
+		goto put_reports_out;
+	err = damon_sysfs_reports_add_dirs(reports);
+	if (err)
+		goto put_reports_out;
+	return err;
+
+put_reports_out:
+	kobject_put(&reports->kobj);
+	ui_dir->reports = NULL;
+put_kdamonds_out:
+	kobject_put(&kdamonds->kobj);
+	ui_dir->kdamonds = NULL;
 	return err;
 }
 
Signature · 1 line
2.47.3
maintainer tree notice
#8 lore raw

+ mm-damon-sysfs-add-admin-reports-directory.patch added to mm-new branch

The patch titled Subject: mm/damon/sysfs: add admin/reports/ directory has been added to the -mm mm-new branch. Its filename is mm-damon-sysfs-add-admin-reports-directory.patch

The patch titled
Subject: mm/damon/sysfs: add admin/reports/ directory
has been added to the -mm mm-new branch. Its filename is
mm-damon-sysfs-add-admin-reports-directory.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-sysfs-add-admin-reports-directory.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: mm/damon/sysfs: add admin/reports/ directory
Date: Tue, 24 Nov 2026 07:36:10 -0800

Add a new sysfs directory, reports/, as a place holder for sysfs files that will be used for controlling the data attribute report system. Put the directory under the admin/ directory, next to kdamonds/ directory.

 mm/damon/sysfs.c |   63 ++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 59 insertions(+), 4 deletions(-)
mm/damon/sysfs.c renamed from mm/damon/sysfs.c~mm-damon-sysfs-add-admin-reports-directory +59 -4
@@ -2979,6 +2979,38 @@ static const struct kobj_type damon_sysf
 	.default_groups = damon_sysfs_kdamonds_groups,
 };
 
+/* reports dir */
+
+struct damon_sysfs_reports {
+	struct kobject kobj;
+};
+
+static struct damon_sysfs_reports *damon_sysfs_reports_alloc(void)
+{
+	return kzalloc_obj(struct damon_sysfs_reports);
+}
+
+static int damon_sysfs_reports_add_dirs(struct damon_sysfs_reports *reports)
+{
+	return 0;
+}
+
+static void damon_sysfs_reports_release(struct kobject *kobj)
+{
+	kfree(container_of(kobj, struct damon_sysfs_reports, kobj));
+}
+
+static struct attribute *damon_sysfs_reports_attrs[] = {
+	NULL,
+};
+ATTRIBUTE_GROUPS(damon_sysfs_reports);
+
+static const struct kobj_type damon_sysfs_reports_ktype = {
+	.release = damon_sysfs_reports_release,
+	.sysfs_ops = &kobj_sysfs_ops,
+	.default_groups = damon_sysfs_reports_groups,
+};
+
 /*
  * damon user interface directory
  */
@@ -2986,6 +3018,7 @@ static const struct kobj_type damon_sysf
 struct damon_sysfs_ui_dir {
 	struct kobject kobj;
 	struct damon_sysfs_kdamonds *kdamonds;
+	struct damon_sysfs_reports *reports;
 };
 
 static struct damon_sysfs_ui_dir *damon_sysfs_ui_dir_alloc(void)
@@ -2996,6 +3029,7 @@ static struct damon_sysfs_ui_dir *damon_
 static int damon_sysfs_ui_dir_add_dirs(struct damon_sysfs_ui_dir *ui_dir)
 {
 	struct damon_sysfs_kdamonds *kdamonds;
+	struct damon_sysfs_reports *reports;
 	int err;
 
 	kdamonds = damon_sysfs_kdamonds_alloc();
@@ -3005,11 +3039,32 @@ static int damon_sysfs_ui_dir_add_dirs(s
 	err = kobject_init_and_add(&kdamonds->kobj,
 			&damon_sysfs_kdamonds_ktype, &ui_dir->kobj,
 			"kdamonds");
-	if (err) {
-		kobject_put(&kdamonds->kobj);
-		return err;
-	}
+	if (err)
+		goto put_kdamonds_out;
 	ui_dir->kdamonds = kdamonds;
+
+	reports = damon_sysfs_reports_alloc();
+	if (!reports) {
+		err = -ENOMEM;
+		goto put_kdamonds_out;
+	}
+	ui_dir->reports = reports;
+
+	err = kobject_init_and_add(&reports->kobj, &damon_sysfs_reports_ktype,
+			&ui_dir->kobj, "reports");
+	if (err)
+		goto put_reports_out;
+	err = damon_sysfs_reports_add_dirs(reports);
+	if (err)
+		goto put_reports_out;
+	return err;
+
+put_reports_out:
+	kobject_put(&reports->kobj);
+	ui_dir->reports = NULL;
+put_kdamonds_out:
+	kobject_put(&kdamonds->kobj);
+	ui_dir->kdamonds = NULL;
 	return err;
 }
 

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#9 lore raw

PATCH v2 5/27 mm/damon/sysfs: add reports/producers/ directory

In reply to SJ Park

Add a new sysfs directory, producers/, under reports/ directory. It is a placeholder for files that will be used for controlling DAMON report producers.

---
 mm/damon/sysfs.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)
mm/damon/sysfs.c +47 -1
index 76850a4b5b5a7..75701ed662222 100644
@@ -2979,10 +2979,38 @@ static const struct kobj_type damon_sysfs_kdamonds_ktype = {
 	.default_groups = damon_sysfs_kdamonds_groups,
 };
 
+/* producers dir */
+
+struct damon_sysfs_producers {
+	struct kobject kobj;
+};
+
+static struct damon_sysfs_producers *damon_sysfs_producers_alloc(void)
+{
+	return kzalloc_obj(struct damon_sysfs_producers);
+}
+
+static void damon_sysfs_producers_release(struct kobject *kobj)
+{
+	kfree(container_of(kobj, struct damon_sysfs_producers, kobj));
+}
+
+static struct attribute *damon_sysfs_producers_attrs[] = {
+	NULL,
+};
+ATTRIBUTE_GROUPS(damon_sysfs_producers);
+
+static const struct kobj_type damon_sysfs_producers_ktype = {
+	.release = damon_sysfs_producers_release,
+	.sysfs_ops = &kobj_sysfs_ops,
+	.default_groups = damon_sysfs_producers_groups,
+};
+
 /* reports dir */
 
 struct damon_sysfs_reports {
 	struct kobject kobj;
+	struct damon_sysfs_producers *producers;
 };
 
 static struct damon_sysfs_reports *damon_sysfs_reports_alloc(void)
@@ -2992,7 +3020,25 @@ static struct damon_sysfs_reports *damon_sysfs_reports_alloc(void)
 
 static int damon_sysfs_reports_add_dirs(struct damon_sysfs_reports *reports)
 {
-	return 0;
+	struct damon_sysfs_producers *producers;
+	int err;
+
+	producers = damon_sysfs_producers_alloc();
+	if (!producers)
+		return -ENOMEM;
+	reports->producers = producers;
+
+	err = kobject_init_and_add(&producers->kobj,
+			&damon_sysfs_producers_ktype, &reports->kobj,
+			"producers");
+	if (err)
+		goto put_producers_out;
+	return err;
+
+put_producers_out:
+	kobject_put(&producers->kobj);
+	reports->producers = NULL;
+	return err;
 }
 
 static void damon_sysfs_reports_release(struct kobject *kobj)
Signature · 1 line
2.47.3
maintainer tree notice
#10 lore raw

+ mm-damon-sysfs-add-reports-producers-directory.patch added to mm-new branch

The patch titled Subject: mm/damon/sysfs: add reports/producers/ directory has been added to the -mm mm-new branch. Its filename is mm-damon-sysfs-add-reports-producers-directory.patch

The patch titled
Subject: mm/damon/sysfs: add reports/producers/ directory
has been added to the -mm mm-new branch. Its filename is
mm-damon-sysfs-add-reports-producers-directory.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-sysfs-add-reports-producers-directory.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: mm/damon/sysfs: add reports/producers/ directory
Date: Tue, 24 Nov 2026 07:36:11 -0800

Add a new sysfs directory, producers/, under reports/ directory. It is a placeholder for files that will be used for controlling DAMON report producers.

 mm/damon/sysfs.c |   48 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)
mm/damon/sysfs.c renamed from mm/damon/sysfs.c~mm-damon-sysfs-add-reports-producers-directory +47 -1
@@ -2979,10 +2979,38 @@ static const struct kobj_type damon_sysf
 	.default_groups = damon_sysfs_kdamonds_groups,
 };
 
+/* producers dir */
+
+struct damon_sysfs_producers {
+	struct kobject kobj;
+};
+
+static struct damon_sysfs_producers *damon_sysfs_producers_alloc(void)
+{
+	return kzalloc_obj(struct damon_sysfs_producers);
+}
+
+static void damon_sysfs_producers_release(struct kobject *kobj)
+{
+	kfree(container_of(kobj, struct damon_sysfs_producers, kobj));
+}
+
+static struct attribute *damon_sysfs_producers_attrs[] = {
+	NULL,
+};
+ATTRIBUTE_GROUPS(damon_sysfs_producers);
+
+static const struct kobj_type damon_sysfs_producers_ktype = {
+	.release = damon_sysfs_producers_release,
+	.sysfs_ops = &kobj_sysfs_ops,
+	.default_groups = damon_sysfs_producers_groups,
+};
+
 /* reports dir */
 
 struct damon_sysfs_reports {
 	struct kobject kobj;
+	struct damon_sysfs_producers *producers;
 };
 
 static struct damon_sysfs_reports *damon_sysfs_reports_alloc(void)
@@ -2992,7 +3020,25 @@ static struct damon_sysfs_reports *damon
 
 static int damon_sysfs_reports_add_dirs(struct damon_sysfs_reports *reports)
 {
-	return 0;
+	struct damon_sysfs_producers *producers;
+	int err;
+
+	producers = damon_sysfs_producers_alloc();
+	if (!producers)
+		return -ENOMEM;
+	reports->producers = producers;
+
+	err = kobject_init_and_add(&producers->kobj,
+			&damon_sysfs_producers_ktype, &reports->kobj,
+			"producers");
+	if (err)
+		goto put_producers_out;
+	return err;
+
+put_producers_out:
+	kobject_put(&producers->kobj);
+	reports->producers = NULL;
+	return err;
 }
 
 static void damon_sysfs_reports_release(struct kobject *kobj)

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#11 lore raw

PATCH v2 6/27 mm/damon/sysfs: add producers/nr_producers file

In reply to SJ Park

Implement a new sysfs file, nr_producers, under the producers/ directory. The file will be used for generating directories for each report producer, in a manner that is similar to the nr_kdamonds file.

---
 mm/damon/sysfs.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
mm/damon/sysfs.c +51 -0
index 75701ed662222..d3a7cb170975a 100644
@@ -2983,6 +2983,7 @@ static const struct kobj_type damon_sysfs_kdamonds_ktype = {
 
 struct damon_sysfs_producers {
 	struct kobject kobj;
+	int nr;
 };
 
 static struct damon_sysfs_producers *damon_sysfs_producers_alloc(void)
@@ -2990,12 +2991,62 @@ static struct damon_sysfs_producers *damon_sysfs_producers_alloc(void)
 	return kzalloc_obj(struct damon_sysfs_producers);
 }
 
+static void damon_sysfs_producers_rm_dirs(
+		struct damon_sysfs_producers *producers)
+{
+	producers->nr = 0;
+}
+
+static int damon_sysfs_producers_add_dirs(
+		struct damon_sysfs_producers *producers, int nr_producers)
+{
+	damon_sysfs_producers_rm_dirs(producers);
+	producers->nr = nr_producers;
+	return 0;
+}
+
+static ssize_t nr_producers_show(struct kobject *kobj,
+		struct kobj_attribute *attr, char *buf)
+{
+	struct damon_sysfs_producers *producers = container_of(kobj,
+			struct damon_sysfs_producers, kobj);
+
+	return sysfs_emit(buf, "%d\n", producers->nr);
+}
+
+static ssize_t nr_producers_store(struct kobject *kobj,
+		struct kobj_attribute *attr, const char *buf, size_t count)
+{
+	struct damon_sysfs_producers *producers;
+	int nr, err = kstrtoint(buf, 0, &nr);
+
+	if (err)
+		return err;
+	if (nr < 0)
+		return -EINVAL;
+
+	producers = container_of(kobj, struct damon_sysfs_producers, kobj);
+
+	if (!mutex_trylock(&damon_sysfs_lock))
+		return -EBUSY;
+	err = damon_sysfs_producers_add_dirs(producers, nr);
+	mutex_unlock(&damon_sysfs_lock);
+	if (err)
+		return err;
+
+	return count;
+}
+
 static void damon_sysfs_producers_release(struct kobject *kobj)
 {
 	kfree(container_of(kobj, struct damon_sysfs_producers, kobj));
 }
 
+static struct kobj_attribute damon_sysfs_producers_nr_attr =
+__ATTR_RW_MODE(nr_producers, 0600);
+
 static struct attribute *damon_sysfs_producers_attrs[] = {
+	&damon_sysfs_producers_nr_attr.attr,
 	NULL,
 };
 ATTRIBUTE_GROUPS(damon_sysfs_producers);
Signature · 1 line
2.47.3
maintainer tree notice
#12 lore raw

+ mm-damon-sysfs-add-producers-nr_producers-file.patch added to mm-new branch

The patch titled Subject: mm/damon/sysfs: add producers/nr_producers file has been added to the -mm mm-new branch. Its filename is mm-damon-sysfs-add-producers-nr_producers-file.patch

The patch titled
Subject: mm/damon/sysfs: add producers/nr_producers file
has been added to the -mm mm-new branch. Its filename is
mm-damon-sysfs-add-producers-nr_producers-file.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-sysfs-add-producers-nr_producers-file.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: mm/damon/sysfs: add producers/nr_producers file
Date: Tue, 24 Nov 2026 07:36:12 -0800

Implement a new sysfs file, nr_producers, under the producers/ directory. The file will be used for generating directories for each report producer, in a manner that is similar to the nr_kdamonds file.

 mm/damon/sysfs.c |   51 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
mm/damon/sysfs.c renamed from mm/damon/sysfs.c~mm-damon-sysfs-add-producers-nr_producers-file +51 -0
@@ -2983,6 +2983,7 @@ static const struct kobj_type damon_sysf
 
 struct damon_sysfs_producers {
 	struct kobject kobj;
+	int nr;
 };
 
 static struct damon_sysfs_producers *damon_sysfs_producers_alloc(void)
@@ -2990,12 +2991,62 @@ static struct damon_sysfs_producers *dam
 	return kzalloc_obj(struct damon_sysfs_producers);
 }
 
+static void damon_sysfs_producers_rm_dirs(
+		struct damon_sysfs_producers *producers)
+{
+	producers->nr = 0;
+}
+
+static int damon_sysfs_producers_add_dirs(
+		struct damon_sysfs_producers *producers, int nr_producers)
+{
+	damon_sysfs_producers_rm_dirs(producers);
+	producers->nr = nr_producers;
+	return 0;
+}
+
+static ssize_t nr_producers_show(struct kobject *kobj,
+		struct kobj_attribute *attr, char *buf)
+{
+	struct damon_sysfs_producers *producers = container_of(kobj,
+			struct damon_sysfs_producers, kobj);
+
+	return sysfs_emit(buf, "%d\n", producers->nr);
+}
+
+static ssize_t nr_producers_store(struct kobject *kobj,
+		struct kobj_attribute *attr, const char *buf, size_t count)
+{
+	struct damon_sysfs_producers *producers;
+	int nr, err = kstrtoint(buf, 0, &nr);
+
+	if (err)
+		return err;
+	if (nr < 0)
+		return -EINVAL;
+
+	producers = container_of(kobj, struct damon_sysfs_producers, kobj);
+
+	if (!mutex_trylock(&damon_sysfs_lock))
+		return -EBUSY;
+	err = damon_sysfs_producers_add_dirs(producers, nr);
+	mutex_unlock(&damon_sysfs_lock);
+	if (err)
+		return err;
+
+	return count;
+}
+
 static void damon_sysfs_producers_release(struct kobject *kobj)
 {
 	kfree(container_of(kobj, struct damon_sysfs_producers, kobj));
 }
 
+static struct kobj_attribute damon_sysfs_producers_nr_attr =
+__ATTR_RW_MODE(nr_producers, 0600);
+
 static struct attribute *damon_sysfs_producers_attrs[] = {
+	&damon_sysfs_producers_nr_attr.attr,
 	NULL,
 };
 ATTRIBUTE_GROUPS(damon_sysfs_producers);

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#13 lore raw

PATCH v2 7/27 mm/damon/sysfs: implement report producer directory

In reply to SJ Park

Implement a sysfs directory for each report producer. Create and remove the directories for reports/producers/nr_producers file writes. It is a placeholder for sysfs files that will be used for controlling each report producer.

---
 mm/damon/sysfs.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 70 insertions(+), 1 deletion(-)
mm/damon/sysfs.c +70 -1
index d3a7cb170975a..7c6bc30c12125 100644
@@ -2979,10 +2979,40 @@ static const struct kobj_type damon_sysfs_kdamonds_ktype = {
 	.default_groups = damon_sysfs_kdamonds_groups,
 };
 
+/* producer dir */
+
+struct damon_sysfs_producer {
+	struct kobject kobj;
+};
+
+static struct damon_sysfs_producer *damon_sysfs_producer_alloc(void)
+{
+	return kzalloc_obj(struct damon_sysfs_producer);
+}
+
+static void damon_sysfs_producer_release(struct kobject *kobj)
+{
+	struct damon_sysfs_producer *producer = container_of(kobj,
+			struct damon_sysfs_producer, kobj);
+	kfree(producer);
+}
+
+static struct attribute *damon_sysfs_producer_attrs[] = {
+	NULL,
+};
+ATTRIBUTE_GROUPS(damon_sysfs_producer);
+
+static const struct kobj_type damon_sysfs_producer_ktype = {
+	.release = damon_sysfs_producer_release,
+	.sysfs_ops = &kobj_sysfs_ops,
+	.default_groups = damon_sysfs_producer_groups,
+};
+
 /* producers dir */
 
 struct damon_sysfs_producers {
 	struct kobject kobj;
+	struct damon_sysfs_producer **producers_arr;
 	int nr;
 };
 
@@ -2994,14 +3024,53 @@ static struct damon_sysfs_producers *damon_sysfs_producers_alloc(void)
 static void damon_sysfs_producers_rm_dirs(
 		struct damon_sysfs_producers *producers)
 {
+	struct damon_sysfs_producer **producers_arr = producers->producers_arr;
+	int i;
+
+	for (i = 0; i < producers->nr; i++) {
+		kobject_del(&producers_arr[i]->kobj);
+		kobject_put(&producers_arr[i]->kobj);
+	}
 	producers->nr = 0;
+	kfree(producers_arr);
+	producers->producers_arr = NULL;
 }
 
 static int damon_sysfs_producers_add_dirs(
 		struct damon_sysfs_producers *producers, int nr_producers)
 {
+	struct damon_sysfs_producer **producers_arr, *producer;
+	int err, i;
+
 	damon_sysfs_producers_rm_dirs(producers);
-	producers->nr = nr_producers;
+	if (!nr_producers)
+		return 0;
+
+	producers_arr = kmalloc_objs(*producers_arr, nr_producers,
+			GFP_KERNEL | __GFP_NOWARN);
+	if (!producers_arr)
+		return -ENOMEM;
+	producers->producers_arr = producers_arr;
+
+	for (i = 0; i < nr_producers; i++) {
+		producer = damon_sysfs_producer_alloc();
+		if (!producer) {
+			damon_sysfs_producers_rm_dirs(producers);
+			return -ENOMEM;
+		}
+
+		err = kobject_init_and_add(&producer->kobj,
+				&damon_sysfs_producer_ktype, &producers->kobj,
+				"%d", i);
+		if (err) {
+			kobject_put(&producer->kobj);
+			damon_sysfs_producers_rm_dirs(producers);
+			return err;
+		}
+
+		producers_arr[i] = producer;
+		producers->nr++;
+	}
 	return 0;
 }
 
Signature · 1 line
2.47.3
maintainer tree notice
#14 lore raw

+ mm-damon-sysfs-implement-report-producer-directory.patch added to mm-new branch

The patch titled Subject: mm/damon/sysfs: implement report producer directory has been added to the -mm mm-new branch. Its filename is mm-damon-sysfs-implement-report-producer-directory.patch

The patch titled
Subject: mm/damon/sysfs: implement report producer directory
has been added to the -mm mm-new branch. Its filename is
mm-damon-sysfs-implement-report-producer-directory.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-sysfs-implement-report-producer-directory.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: mm/damon/sysfs: implement report producer directory
Date: Tue, 24 Nov 2026 07:36:13 -0800

Implement a sysfs directory for each report producer. Create and remove the directories for reports/producers/nr_producers file writes. It is a placeholder for sysfs files that will be used for controlling each report producer.

 mm/damon/sysfs.c |   71 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 70 insertions(+), 1 deletion(-)
mm/damon/sysfs.c renamed from mm/damon/sysfs.c~mm-damon-sysfs-implement-report-producer-directory +70 -1
@@ -2979,10 +2979,40 @@ static const struct kobj_type damon_sysf
 	.default_groups = damon_sysfs_kdamonds_groups,
 };
 
+/* producer dir */
+
+struct damon_sysfs_producer {
+	struct kobject kobj;
+};
+
+static struct damon_sysfs_producer *damon_sysfs_producer_alloc(void)
+{
+	return kzalloc_obj(struct damon_sysfs_producer);
+}
+
+static void damon_sysfs_producer_release(struct kobject *kobj)
+{
+	struct damon_sysfs_producer *producer = container_of(kobj,
+			struct damon_sysfs_producer, kobj);
+	kfree(producer);
+}
+
+static struct attribute *damon_sysfs_producer_attrs[] = {
+	NULL,
+};
+ATTRIBUTE_GROUPS(damon_sysfs_producer);
+
+static const struct kobj_type damon_sysfs_producer_ktype = {
+	.release = damon_sysfs_producer_release,
+	.sysfs_ops = &kobj_sysfs_ops,
+	.default_groups = damon_sysfs_producer_groups,
+};
+
 /* producers dir */
 
 struct damon_sysfs_producers {
 	struct kobject kobj;
+	struct damon_sysfs_producer **producers_arr;
 	int nr;
 };
 
@@ -2994,14 +3024,53 @@ static struct damon_sysfs_producers *dam
 static void damon_sysfs_producers_rm_dirs(
 		struct damon_sysfs_producers *producers)
 {
+	struct damon_sysfs_producer **producers_arr = producers->producers_arr;
+	int i;
+
+	for (i = 0; i < producers->nr; i++) {
+		kobject_del(&producers_arr[i]->kobj);
+		kobject_put(&producers_arr[i]->kobj);
+	}
 	producers->nr = 0;
+	kfree(producers_arr);
+	producers->producers_arr = NULL;
 }
 
 static int damon_sysfs_producers_add_dirs(
 		struct damon_sysfs_producers *producers, int nr_producers)
 {
+	struct damon_sysfs_producer **producers_arr, *producer;
+	int err, i;
+
 	damon_sysfs_producers_rm_dirs(producers);
-	producers->nr = nr_producers;
+	if (!nr_producers)
+		return 0;
+
+	producers_arr = kmalloc_objs(*producers_arr, nr_producers,
+			GFP_KERNEL | __GFP_NOWARN);
+	if (!producers_arr)
+		return -ENOMEM;
+	producers->producers_arr = producers_arr;
+
+	for (i = 0; i < nr_producers; i++) {
+		producer = damon_sysfs_producer_alloc();
+		if (!producer) {
+			damon_sysfs_producers_rm_dirs(producers);
+			return -ENOMEM;
+		}
+
+		err = kobject_init_and_add(&producer->kobj,
+				&damon_sysfs_producer_ktype, &producers->kobj,
+				"%d", i);
+		if (err) {
+			kobject_put(&producer->kobj);
+			damon_sysfs_producers_rm_dirs(producers);
+			return err;
+		}
+
+		producers_arr[i] = producer;
+		producers->nr++;
+	}
 	return 0;
 }
 

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#15 lore raw

PATCH v2 8/27 mm/damon/sysfs: implement report producer type and state files

In reply to SJ Park

Implement report_type and producer_state files under the report producer directory. The type file receives the type of the reports that the producer will generate and submit to DAMON. The producer_state file enables and disables the producer.

---
 mm/damon/sysfs.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)
mm/damon/sysfs.c +80 -0
index 7c6bc30c12125..7cdbe2fedf7d8 100644
@@ -2983,6 +2983,8 @@ static const struct kobj_type damon_sysfs_kdamonds_ktype = {
 
 struct damon_sysfs_producer {
 	struct kobject kobj;
+	enum damon_report_type report_type;
+	bool enabled;
 };
 
 static struct damon_sysfs_producer *damon_sysfs_producer_alloc(void)
@@ -2990,6 +2992,77 @@ static struct damon_sysfs_producer *damon_sysfs_producer_alloc(void)
 	return kzalloc_obj(struct damon_sysfs_producer);
 }
 
+struct damon_sysfs_report_type_name {
+	enum damon_report_type type;
+	char *name;
+};
+
+static const struct damon_sysfs_report_type_name
+damon_sysfs_report_type_names[] = {
+};
+
+static ssize_t report_type_show(struct kobject *kobj,
+		struct kobj_attribute *attr, char *buf)
+{
+	struct damon_sysfs_producer *producer = container_of(kobj,
+			struct damon_sysfs_producer, kobj);
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(damon_sysfs_report_type_names); i++) {
+		const struct damon_sysfs_report_type_name *type_name;
+
+		type_name = &damon_sysfs_report_type_names[i];
+		if (type_name->type == producer->report_type)
+			return sysfs_emit(buf, "%s\n", type_name->name);
+	}
+	return -EINVAL;
+}
+
+static ssize_t report_type_store(struct kobject *kobj,
+		struct kobj_attribute *attr, const char *buf, size_t count)
+{
+	struct damon_sysfs_producer *producer = container_of(kobj,
+			struct damon_sysfs_producer, kobj);
+	ssize_t ret = -EINVAL;
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(damon_sysfs_report_type_names); i++) {
+		const struct damon_sysfs_report_type_name *type_name;
+
+		type_name = &damon_sysfs_report_type_names[i];
+		if (sysfs_streq(buf, type_name->name)) {
+			producer->report_type = type_name->type;
+			ret = count;
+			break;
+		}
+	}
+	return ret;
+}
+
+static ssize_t producer_state_show(struct kobject *kobj,
+		struct kobj_attribute *attr, char *buf)
+{
+	struct damon_sysfs_producer *producer = container_of(kobj,
+			struct damon_sysfs_producer, kobj);
+
+	return sysfs_emit(buf, "%s\n", producer->enabled ? "on" : "off");
+}
+
+static ssize_t producer_state_store(struct kobject *kobj,
+		struct kobj_attribute *attr, const char *buf, size_t count)
+{
+	struct damon_sysfs_producer *producer = container_of(kobj,
+			struct damon_sysfs_producer, kobj);
+
+	if (sysfs_streq(buf, "on"))
+		producer->enabled = true;
+	else if (sysfs_streq(buf, "off"))
+		producer->enabled = false;
+	else
+		return -EINVAL;
+	return count;
+}
+
 static void damon_sysfs_producer_release(struct kobject *kobj)
 {
 	struct damon_sysfs_producer *producer = container_of(kobj,
@@ -2997,7 +3070,14 @@ static void damon_sysfs_producer_release(struct kobject *kobj)
 	kfree(producer);
 }
 
+static struct kobj_attribute damon_sysfs_producer_report_type_attr =
+		__ATTR_RW_MODE(report_type, 0600);
+static struct kobj_attribute damon_sysfs_producer_producer_state_type_attr =
+		__ATTR_RW_MODE(producer_state, 0600);
+
 static struct attribute *damon_sysfs_producer_attrs[] = {
+	&damon_sysfs_producer_report_type_attr.attr,
+	&damon_sysfs_producer_producer_state_type_attr.attr,
 	NULL,
 };
 ATTRIBUTE_GROUPS(damon_sysfs_producer);
Signature · 1 line
2.47.3
maintainer tree notice
#16 lore raw

+ mm-damon-sysfs-implement-report-producer-type-and-state-files.patch added to mm-new branch

The patch titled Subject: mm/damon/sysfs: implement report producer type and state files has been added to the -mm mm-new branch. Its filename is…

The patch titled
Subject: mm/damon/sysfs: implement report producer type and state files
has been added to the -mm mm-new branch. Its filename is
mm-damon-sysfs-implement-report-producer-type-and-state-files.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-sysfs-implement-report-producer-type-and-state-files.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: mm/damon/sysfs: implement report producer type and state files
Date: Tue, 24 Nov 2026 07:36:14 -0800

Implement report_type and producer_state files under the report producer directory. The type file receives the type of the reports that the producer will generate and submit to DAMON. The producer_state file enables and disables the producer.

 mm/damon/sysfs.c |   80 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)
mm/damon/sysfs.c renamed from mm/damon/sysfs.c~mm-damon-sysfs-implement-report-producer-type-and-state-files +80 -0
@@ -2983,6 +2983,8 @@ static const struct kobj_type damon_sysf
 
 struct damon_sysfs_producer {
 	struct kobject kobj;
+	enum damon_report_type report_type;
+	bool enabled;
 };
 
 static struct damon_sysfs_producer *damon_sysfs_producer_alloc(void)
@@ -2990,6 +2992,77 @@ static struct damon_sysfs_producer *damo
 	return kzalloc_obj(struct damon_sysfs_producer);
 }
 
+struct damon_sysfs_report_type_name {
+	enum damon_report_type type;
+	char *name;
+};
+
+static const struct damon_sysfs_report_type_name
+damon_sysfs_report_type_names[] = {
+};
+
+static ssize_t report_type_show(struct kobject *kobj,
+		struct kobj_attribute *attr, char *buf)
+{
+	struct damon_sysfs_producer *producer = container_of(kobj,
+			struct damon_sysfs_producer, kobj);
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(damon_sysfs_report_type_names); i++) {
+		const struct damon_sysfs_report_type_name *type_name;
+
+		type_name = &damon_sysfs_report_type_names[i];
+		if (type_name->type == producer->report_type)
+			return sysfs_emit(buf, "%s\n", type_name->name);
+	}
+	return -EINVAL;
+}
+
+static ssize_t report_type_store(struct kobject *kobj,
+		struct kobj_attribute *attr, const char *buf, size_t count)
+{
+	struct damon_sysfs_producer *producer = container_of(kobj,
+			struct damon_sysfs_producer, kobj);
+	ssize_t ret = -EINVAL;
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(damon_sysfs_report_type_names); i++) {
+		const struct damon_sysfs_report_type_name *type_name;
+
+		type_name = &damon_sysfs_report_type_names[i];
+		if (sysfs_streq(buf, type_name->name)) {
+			producer->report_type = type_name->type;
+			ret = count;
+			break;
+		}
+	}
+	return ret;
+}
+
+static ssize_t producer_state_show(struct kobject *kobj,
+		struct kobj_attribute *attr, char *buf)
+{
+	struct damon_sysfs_producer *producer = container_of(kobj,
+			struct damon_sysfs_producer, kobj);
+
+	return sysfs_emit(buf, "%s\n", producer->enabled ? "on" : "off");
+}
+
+static ssize_t producer_state_store(struct kobject *kobj,
+		struct kobj_attribute *attr, const char *buf, size_t count)
+{
+	struct damon_sysfs_producer *producer = container_of(kobj,
+			struct damon_sysfs_producer, kobj);
+
+	if (sysfs_streq(buf, "on"))
+		producer->enabled = true;
+	else if (sysfs_streq(buf, "off"))
+		producer->enabled = false;
+	else
+		return -EINVAL;
+	return count;
+}
+
 static void damon_sysfs_producer_release(struct kobject *kobj)
 {
 	struct damon_sysfs_producer *producer = container_of(kobj,
@@ -2997,7 +3070,14 @@ static void damon_sysfs_producer_release
 	kfree(producer);
 }
 
+static struct kobj_attribute damon_sysfs_producer_report_type_attr =
+		__ATTR_RW_MODE(report_type, 0600);
+static struct kobj_attribute damon_sysfs_producer_producer_state_type_attr =
+		__ATTR_RW_MODE(producer_state, 0600);
+
 static struct attribute *damon_sysfs_producer_attrs[] = {
+	&damon_sysfs_producer_report_type_attr.attr,
+	&damon_sysfs_producer_producer_state_type_attr.attr,
 	NULL,
 };
 ATTRIBUTE_GROUPS(damon_sysfs_producer);

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#17 lore raw

PATCH v2 9/27 Docs/mm/damon/design: update for report system

In reply to SJ Park

Update DAMON design for the data attribute report system.

---
 Documentation/mm/damon/design.rst | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
Documentation/mm/damon/design.rst +26 -0
index ca8fbf93d556f..59dba2fe0dfbf 100644
@@ -356,6 +356,32 @@ monitoring.
 Refer to the :ref:`admin guide <damon_usage_sysfs_probes>` to know how users
 can use the mode.
 
+.. _damon_design_attr_reporting:
+
+Data Attributes Reporting
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+DAMON-external entities such as other kernel components and users may have
+special data attribute information.  DAMON provides a system that let them
+report such information to DAMON.
+
+DAMON provides the kernel API for submitting a report of data attribute
+information to DAMON.  A report describes what type of the report is,
+representing the reporting data attribute type.  A report also describes the
+address range of the memory that the report is made for.  Depending on the
+report type, the report can have additional information.  The report is saved
+in DAMON's internal queue.  The queue is automatically managed by DAMON with
+its best effort.
+
+DAMON provides the user :ref:`ABI <damon_usage_sysfs_reports_producers>` for
+configuring report producers.  Each producer is configured for a specific
+report type.  Users can dynamically enable and disable those.  When enabled, it
+can generate and submit reports of the given type.  The generations and
+submissions could be done automatically by the kernel or manually by the user,
+depending on the type of the report.
+
+For now, no report type is supported.
+
 Dynamic Target Space Updates Handling
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Signature · 1 line
2.47.3
maintainer tree notice
#18 lore raw

+ docs-mm-damon-design-update-for-report-system.patch added to mm-new branch

The patch titled Subject: Docs/mm/damon/design: update for report system has been added to the -mm mm-new branch. Its filename is docs-mm-damon-design-update-for-report-system.patch

The patch titled
Subject: Docs/mm/damon/design: update for report system
has been added to the -mm mm-new branch. Its filename is
docs-mm-damon-design-update-for-report-system.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/docs-mm-damon-design-update-for-report-system.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: Docs/mm/damon/design: update for report system
Date: Tue, 24 Nov 2026 07:36:15 -0800

Update DAMON design for the data attribute report system.

 Documentation/mm/damon/design.rst |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
Documentation/mm/damon/design.rst renamed from Documentation/mm/damon/design.rst~docs-mm-damon-design-update-for-report-system +26 -0
@@ -356,6 +356,32 @@ monitoring.
 Refer to the :ref:`admin guide <damon_usage_sysfs_probes>` to know how users
 can use the mode.
 
+.. _damon_design_attr_reporting:
+
+Data Attributes Reporting
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+DAMON-external entities such as other kernel components and users may have
+special data attribute information.  DAMON provides a system that let them
+report such information to DAMON.
+
+DAMON provides the kernel API for submitting a report of data attribute
+information to DAMON.  A report describes what type of the report is,
+representing the reporting data attribute type.  A report also describes the
+address range of the memory that the report is made for.  Depending on the
+report type, the report can have additional information.  The report is saved
+in DAMON's internal queue.  The queue is automatically managed by DAMON with
+its best effort.
+
+DAMON provides the user :ref:`ABI <damon_usage_sysfs_reports_producers>` for
+configuring report producers.  Each producer is configured for a specific
+report type.  Users can dynamically enable and disable those.  When enabled, it
+can generate and submit reports of the given type.  The generations and
+submissions could be done automatically by the kernel or manually by the user,
+depending on the type of the report.
+
+For now, no report type is supported.
+
 Dynamic Target Space Updates Handling
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#19 lore raw

PATCH v2 10/27 Docs/admin-guide/mm/damon/usage: update for report producer sysfs

In reply to SJ Park

Update DAMON usage document for the newly added report producer control sysfs files.

---
 Documentation/admin-guide/mm/damon/usage.rst | 35 ++++++++++++++++++++
 1 file changed, 35 insertions(+)
Documentation/admin-guide/mm/damon/usage.rst +35 -0
index 51c4909f1a8b2..5e0633b5879de 100644
@@ -118,6 +118,10 @@ comma (",").
     │ │ │ │ │ │ ...
     │ │ │ │ ...
     │ │ ...
+    │ reports/
+    │ │ producers/nr_producers
+    │ │ │ 0/report_type,producer_state
+    │ │ │ ...
 
 .. _sysfs_root:
 
@@ -732,6 +736,37 @@ Please note that it's highly recommended to use user space tools like `damo
 <https://github.com/damonitor/damo>`_ rather than manually reading and writing
 the files as above.  Above is only for an example.
 
+.. _damon_usage_sysfs_reports_producers:
+
+reports/producers/
+------------------
+
+Under the `admin/` directory, ``reports/producers/`` directory exists.  This
+directory is for configuring :ref:`DAMON report producers
+<damon_design_attr_reporting>`.  The file below exists in the directory.
+
+``nr_producers`` file is for generating report producers setup files.  Writing
+an integer ``N`` to the file creates the number of directories named ``0`` to
+``N-1``.  Each number-named directory is for configuring each report producer
+and called "producer directory".
+
+reports/producers/<N>/
+----------------------
+
+Files below exist in each producer directory.
+
+``report_type`` file is for setting the type of the report to produce.  Users
+can set the type by writing the type name to the file.  Reading the file shows
+the last successfully written input.  Refer to the :ref:`design document
+<damon_design_attr_reporting>` for the list of supported report types.
+
+``producer_state`` file is for reading and updating the state.  Reading it
+shows ``on`` or ``off`` if the producer is enabled or disabled, respectively.
+Users can write below keywords for the producer to the file.
+
+- ``on``: Enable the producer.
+- ``off``: Disable the producer.
+
 .. _tracepoint:
 
 Tracepoints for Monitoring Results
Signature · 1 line
2.47.3
maintainer tree notice
#20 lore raw

+ docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch added to mm-new branch

The patch titled Subject: Docs/admin-guide/mm/damon/usage: update for report producer sysfs has been added to the -mm mm-new branch. Its filename is…

The patch titled
Subject: Docs/admin-guide/mm/damon/usage: update for report producer sysfs
has been added to the -mm mm-new branch. Its filename is
docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: Docs/admin-guide/mm/damon/usage: update for report producer sysfs
Date: Tue, 24 Nov 2026 07:36:16 -0800

Update DAMON usage document for the newly added report producer control sysfs files.

 Documentation/admin-guide/mm/damon/usage.rst |   35 +++++++++++++++++
 1 file changed, 35 insertions(+)
Documentation/admin-guide/mm/damon/usage.rst renamed from Documentation/admin-guide/mm/damon/usage.rst~docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs +35 -0
@@ -118,6 +118,10 @@ comma (",").
     │ │ │ │ │ │ ...
     │ │ │ │ ...
     │ │ ...
+    │ reports/
+    │ │ producers/nr_producers
+    │ │ │ 0/report_type,producer_state
+    │ │ │ ...
 
 .. _sysfs_root:
 
@@ -732,6 +736,37 @@ Please note that it's highly recommended
 <https://github.com/damonitor/damo>`_ rather than manually reading and writing
 the files as above.  Above is only for an example.
 
+.. _damon_usage_sysfs_reports_producers:
+
+reports/producers/
+------------------
+
+Under the `admin/` directory, ``reports/producers/`` directory exists.  This
+directory is for configuring :ref:`DAMON report producers
+<damon_design_attr_reporting>`.  The file below exists in the directory.
+
+``nr_producers`` file is for generating report producers setup files.  Writing
+an integer ``N`` to the file creates the number of directories named ``0`` to
+``N-1``.  Each number-named directory is for configuring each report producer
+and called "producer directory".
+
+reports/producers/<N>/
+----------------------
+
+Files below exist in each producer directory.
+
+``report_type`` file is for setting the type of the report to produce.  Users
+can set the type by writing the type name to the file.  Reading the file shows
+the last successfully written input.  Refer to the :ref:`design document
+<damon_design_attr_reporting>` for the list of supported report types.
+
+``producer_state`` file is for reading and updating the state.  Reading it
+shows ``on`` or ``off`` if the producer is enabled or disabled, respectively.
+Users can write below keywords for the producer to the file.
+
+- ``on``: Enable the producer.
+- ``off``: Disable the producer.
+
 .. _tracepoint:
 
 Tracepoints for Monitoring Results

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#21 lore raw

PATCH v2 11/27 Docs/ABI/damon: update for report producer sysfs files

In reply to SJ Park

Update DAMON ABI document for the newly added data attribute report producer control sysfs files.

---
 .../ABI/testing/sysfs-kernel-mm-damon         | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)
Documentation/ABI/testing/sysfs-kernel-mm-damon +20 -0
index 92348178e48a0..b5e5004ec9fb7 100644
@@ -702,3 +702,23 @@ Date:		May 2026
 Contact:	SJ Park <[email protected]>
 Description:	Reading this file returns the number of data-attribute
 		monitoring probe-hit positive samples of the region.
+
+What:		/sys/kernel/mm/damon/admin/reports/producers/nr_producers
+Date:		Nov 2026
+Contact:	SJ Park <[email protected]>
+Description:	Writing a number 'N' to this file creates the number of
+		directories for controlling each DAMON report producers
+		named '0' to 'N-1' under the 'producers/' directory.
+
+What:		/sys/kernel/mm/damon/admin/reports/producers/<P>/report_type
+Date:		Nov 2026
+Contact:	SJ Park <[email protected]>
+Description:	Writing to and reading from this file sets and gets the type of
+		the reports the producer will generate and submit.
+
+What:		/sys/kernel/mm/damon/admin/reports/producers/<P>/producer_state
+Date:		Nov 2026
+Contact:	SJ Park <[email protected]>
+Description:	A file for requesting actions including enablement and
+		disablement of the producer.  Refer to
+		Documentation/admin-guide/mm/damon/usage.rst for more details.
Signature · 1 line
2.47.3
maintainer tree notice
#22 lore raw

+ docs-abi-damon-update-for-report-producer-sysfs-files.patch added to mm-new branch

The patch titled Subject: Docs/ABI/damon: update for report producer sysfs files has been added to the -mm mm-new branch. Its filename is docs-abi-damon-update-for-report-producer-sysfs-files.patch

The patch titled
Subject: Docs/ABI/damon: update for report producer sysfs files
has been added to the -mm mm-new branch. Its filename is
docs-abi-damon-update-for-report-producer-sysfs-files.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/docs-abi-damon-update-for-report-producer-sysfs-files.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: Docs/ABI/damon: update for report producer sysfs files
Date: Tue, 24 Nov 2026 07:36:17 -0800

Update DAMON ABI document for the newly added data attribute report producer control sysfs files.

 Documentation/ABI/testing/sysfs-kernel-mm-damon |   20 ++++++++++++++
 1 file changed, 20 insertions(+)
Documentation/ABI/testing/sysfs-kernel-mm-damon renamed from Documentation/ABI/testing/sysfs-kernel-mm-damon~docs-abi-damon-update-for-report-producer-sysfs-files +20 -0
@@ -702,3 +702,23 @@ Date:		May 2026
 Contact:	SJ Park <[email protected]>
 Description:	Reading this file returns the number of data-attribute
 		monitoring probe-hit positive samples of the region.
+
+What:		/sys/kernel/mm/damon/admin/reports/producers/nr_producers
+Date:		Nov 2026
+Contact:	SJ Park <[email protected]>
+Description:	Writing a number 'N' to this file creates the number of
+		directories for controlling each DAMON report producers
+		named '0' to 'N-1' under the 'producers/' directory.
+
+What:		/sys/kernel/mm/damon/admin/reports/producers/<P>/report_type
+Date:		Nov 2026
+Contact:	SJ Park <[email protected]>
+Description:	Writing to and reading from this file sets and gets the type of
+		the reports the producer will generate and submit.
+
+What:		/sys/kernel/mm/damon/admin/reports/producers/<P>/producer_state
+Date:		Nov 2026
+Contact:	SJ Park <[email protected]>
+Description:	A file for requesting actions including enablement and
+		disablement of the producer.  Refer to
+		Documentation/admin-guide/mm/damon/usage.rst for more details.

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#23 lore raw

PATCH v2 12/27 mm/damon/core: introduce DAMON_FILTER_TYPE_REPORT_MADE

In reply to SJ Park

Extend DAMON probe filter for the existence of data attribute reports for the probing memory. Define a new filter type, REPORT_MADE, for the purpose. Add a union argument for specifying the type of the reports for the filter. Update the new argument for the new type when new filter parameters of the type are committed.

---
 include/linux/damon.h | 5 +++++
 mm/damon/core.c       | 6 ++++++
 2 files changed, 11 insertions(+)
include/linux/damon.h +5 -0
index 30c0ab8d88c2c..9f48f17969d03 100644
@@ -808,6 +808,7 @@ struct damon_prep {
  * @DAMON_FILTER_TYPE_PGIDLE_SET:	Pgidle is set.
  * @DAMON_FILTER_TYPE_HUGEPAGE_SIZE:	Page is part of a hugepage.
  * @DAMON_FILTER_TYPE_ACTIVE:		LRU-active pages.
+ * @DAMON_FILTER_TYPE_REPORT_MADE:	Report is submitted.
  */
 enum damon_filter_type {
 	DAMON_FILTER_TYPE_ANON,
@@ -816,6 +817,7 @@ enum damon_filter_type {
 	DAMON_FILTER_TYPE_PGIDLE_SET,
 	DAMON_FILTER_TYPE_HUGEPAGE_SIZE,
 	DAMON_FILTER_TYPE_ACTIVE,
+	DAMON_FILTER_TYPE_REPORT_MADE,
 };
 
 /**
@@ -827,6 +829,8 @@ enum damon_filter_type {
  * @memcg_id:	Memcg id of the question if @type is DAMON_FILTER_MEMCG.
  * @range_min:	Minimum value of range arguments.
  * @range_max:	Maximum value of range arguments.
+ * @report_type:	Type of the report, if @type is
+ *			DAMON_FILTER_TYPE_REPORT_MADE..
  */
 struct damon_filter {
 	enum damon_filter_type type;
@@ -838,6 +842,7 @@ struct damon_filter {
 			unsigned long range_min;
 			unsigned long range_max;
 		};
+		enum damon_report_type report_type;
 	};
 /* private: */
 	/* Siblings list. */
mm/damon/core.c +6 -0
index ae6ef43e5653f..d4a4aca4a831b 100644
@@ -1837,6 +1837,9 @@ static int damon_commit_filter(struct damon_filter *dst,
 		dst->range_min = src->range_min;
 		dst->range_max = src->range_max;
 		break;
+	case DAMON_FILTER_TYPE_REPORT_MADE:
+		dst->report_type = src->report_type;
+		break;
 	default:
 		break;
 	}
@@ -1880,6 +1883,9 @@ static int damon_commit_filters(struct damon_probe *dst,
 			new_filter->range_min = src_filter->range_min;
 			new_filter->range_max = src_filter->range_max;
 			break;
+		case DAMON_FILTER_TYPE_REPORT_MADE:
+			new_filter->report_type = src_filter->report_type;
+			break;
 		default:
 			break;
 		}
Signature · 1 line
2.47.3
maintainer tree notice
#24 lore raw

+ mm-damon-core-introduce-damon_filter_type_report_made.patch added to mm-new branch

The patch titled Subject: mm/damon/core: introduce DAMON_FILTER_TYPE_REPORT_MADE has been added to the -mm mm-new branch. Its filename is mm-damon-core-introduce-damon_filter_type_report_made.patch

The patch titled
Subject: mm/damon/core: introduce DAMON_FILTER_TYPE_REPORT_MADE
has been added to the -mm mm-new branch. Its filename is
mm-damon-core-introduce-damon_filter_type_report_made.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-core-introduce-damon_filter_type_report_made.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: mm/damon/core: introduce DAMON_FILTER_TYPE_REPORT_MADE
Date: Tue, 24 Nov 2026 07:36:18 -0800

Extend DAMON probe filter for the existence of data attribute reports for the probing memory. Define a new filter type, REPORT_MADE, for the purpose. Add a union argument for specifying the type of the reports for the filter. Update the new argument for the new type when new filter parameters of the type are committed.

 include/linux/damon.h |    5 +++++
 mm/damon/core.c       |    6 ++++++
 2 files changed, 11 insertions(+)
include/linux/damon.h renamed from include/linux/damon.h~mm-damon-core-introduce-damon_filter_type_report_made +5 -0
@@ -808,6 +808,7 @@ struct damon_prep {
  * @DAMON_FILTER_TYPE_PGIDLE_SET:	Pgidle is set.
  * @DAMON_FILTER_TYPE_HUGEPAGE_SIZE:	Page is part of a hugepage.
  * @DAMON_FILTER_TYPE_ACTIVE:		LRU-active pages.
+ * @DAMON_FILTER_TYPE_REPORT_MADE:	Report is submitted.
  */
 enum damon_filter_type {
 	DAMON_FILTER_TYPE_ANON,
@@ -816,6 +817,7 @@ enum damon_filter_type {
 	DAMON_FILTER_TYPE_PGIDLE_SET,
 	DAMON_FILTER_TYPE_HUGEPAGE_SIZE,
 	DAMON_FILTER_TYPE_ACTIVE,
+	DAMON_FILTER_TYPE_REPORT_MADE,
 };
 
 /**
@@ -827,6 +829,8 @@ enum damon_filter_type {
  * @memcg_id:	Memcg id of the question if @type is DAMON_FILTER_MEMCG.
  * @range_min:	Minimum value of range arguments.
  * @range_max:	Maximum value of range arguments.
+ * @report_type:	Type of the report, if @type is
+ *			DAMON_FILTER_TYPE_REPORT_MADE..
  */
 struct damon_filter {
 	enum damon_filter_type type;
@@ -838,6 +842,7 @@ struct damon_filter {
 			unsigned long range_min;
 			unsigned long range_max;
 		};
+		enum damon_report_type report_type;
 	};
 /* private: */
 	/* Siblings list. */
mm/damon/core.c renamed from mm/damon/core.c~mm-damon-core-introduce-damon_filter_type_report_made +6 -0
@@ -1837,6 +1837,9 @@ static int damon_commit_filter(struct da
 		dst->range_min = src->range_min;
 		dst->range_max = src->range_max;
 		break;
+	case DAMON_FILTER_TYPE_REPORT_MADE:
+		dst->report_type = src->report_type;
+		break;
 	default:
 		break;
 	}
@@ -1880,6 +1883,9 @@ static int damon_commit_filters(struct d
 			new_filter->range_min = src_filter->range_min;
 			new_filter->range_max = src_filter->range_max;
 			break;
+		case DAMON_FILTER_TYPE_REPORT_MADE:
+			new_filter->report_type = src_filter->report_type;
+			break;
 		default:
 			break;
 		}

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#25 lore raw

PATCH v2 13/27 mm/damon/core: introduce damon_report_exist()

In reply to SJ Park

Implement and expose a new DAMON API function for searching data attribute reports from the report queue. The purpose is to let operation sets use it for supporting the REPORT_MADE type probe filters.

The caller can specify the type, associated memory address range, and the creation time range of reports to search.

The function uses CAS-based try-locking for the mutual-exclusive synchronization. If any parallel access to the queue is detected, it forgives searching.

---
 include/linux/damon.h |  3 +++
 mm/damon/core.c       | 46 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+)
include/linux/damon.h +3 -0
index 9f48f17969d03..38efa41b3d1ab 100644
@@ -1199,6 +1199,9 @@ int damon_call(struct damon_ctx *ctx, struct damon_call_control *control);
 int damos_walk(struct damon_ctx *ctx, struct damos_walk_control *control);
 
 int damon_submit_report(struct damon_report *report);
+bool damon_report_exist(enum damon_report_type report_type,
+		struct damon_addr_range *addr_range,
+		unsigned long jiffies_old);
 
 int damon_set_region_system_rams_default(struct damon_target *t,
 				unsigned long *start, unsigned long *end,
mm/damon/core.c +46 -0

52 lines not on this page · raw message

Signature · 1 line
2.47.3
maintainer tree notice
#26 lore raw

+ mm-damon-core-introduce-damon_report_exist.patch added to mm-new branch

The patch titled Subject: mm/damon/core: introduce damon_report_exist() has been added to the -mm mm-new branch. Its filename is mm-damon-core-introduce-damon_report_exist.patch

The patch titled
Subject: mm/damon/core: introduce damon_report_exist()
has been added to the -mm mm-new branch. Its filename is
mm-damon-core-introduce-damon_report_exist.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-core-introduce-damon_report_exist.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: mm/damon/core: introduce damon_report_exist()
Date: Tue, 24 Nov 2026 07:36:19 -0800

Implement and expose a new DAMON API function for searching data attribute reports from the report queue. The purpose is to let operation sets use it for supporting the REPORT_MADE type probe filters.

The caller can specify the type, associated memory address range, and the creation time range of reports to search.

The function uses CAS-based try-locking for the mutual-exclusive synchronization. If any parallel access to the queue is detected, it forgives searching.

 include/linux/damon.h |    3 ++
 mm/damon/core.c       |   46 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+)
include/linux/damon.h renamed from include/linux/damon.h~mm-damon-core-introduce-damon_report_exist +3 -0
@@ -1199,6 +1199,9 @@ int damon_call(struct damon_ctx *ctx, st
 int damos_walk(struct damon_ctx *ctx, struct damos_walk_control *control);
 
 int damon_submit_report(struct damon_report *report);
+bool damon_report_exist(enum damon_report_type report_type,
+		struct damon_addr_range *addr_range,
+		unsigned long jiffies_old);
 
 int damon_set_region_system_rams_default(struct damon_target *t,
 				unsigned long *start, unsigned long *end,
mm/damon/core.c renamed from mm/damon/core.c~mm-damon-core-introduce-damon_report_exist +46 -0

52 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#27 lore raw

PATCH v2 14/27 mm/damon/paddr: support REPORT_MADE type probe filter

In reply to SJ Park

Add a support of DAMON_FILTER_TYPE_REPORT_MADE type probe filter to the physical address space operation set. Use the DAMON core API function, damon_report_exist() for the core report search functionality. Set the time range as the last sampling interval. Pass damon_ctx to the filter matching function for getting the sampling interval.

---
 mm/damon/paddr.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
mm/damon/paddr.c +13 -4
index 411e1d557ba3f..70e8687dd1f66 100644
@@ -140,9 +140,10 @@ static void damon_pa_prep_probes(struct damon_ctx *ctx, bool set_samples)
 }
 
 static bool damon_pa_filter_match(struct damon_filter *filter,
-		struct folio *folio)
+		struct folio *folio, phys_addr_t pa, struct damon_ctx *ctx)
 {
 	bool matched = false;
+	struct damon_addr_range addr_range;
 
 	switch (filter->type) {
 	case DAMON_FILTER_TYPE_PGIDLE_UNSET:
@@ -157,19 +158,27 @@ static bool damon_pa_filter_match(struct damon_filter *filter,
 		else
 			matched = damon_folio_young(folio) == false;
 		break;
+	case DAMON_FILTER_TYPE_REPORT_MADE:
+		addr_range.start = damon_pa_core_addr(pa, ctx->addr_unit);
+		addr_range.end = addr_range.start + 1;
+		matched = damon_report_exist(filter->report_type, &addr_range,
+				jiffies -
+				usecs_to_jiffies(ctx->attrs.sample_interval));
+		break;
 	default:
 		return damon_ops_filter_match(filter, folio);
 	}
 	return matched == filter->matching;
 }
 
-static bool damon_pa_filter_pass(struct folio *folio, struct damon_probe *p)
+static bool damon_pa_filter_pass(struct folio *folio, struct damon_probe *p,
+		phys_addr_t pa, struct damon_ctx *ctx)
 {
 	struct damon_filter *f;
 	bool pass = true;
 
 	damon_for_each_filter(f, p) {
-		if (damon_pa_filter_match(f, folio)) {
+		if (damon_pa_filter_match(f, folio, pa, ctx)) {
 			pass = f->allow;
 			break;
 		}
@@ -199,7 +208,7 @@ static unsigned int damon_pa_apply_probes(struct damon_ctx *ctx,
 					ctx->addr_unit);
 			folio = damon_get_folio(PHYS_PFN(pa));
 			damon_for_each_probe(p, ctx) {
-				if (damon_pa_filter_pass(folio, p))
+				if (damon_pa_filter_pass(folio, p, pa, ctx))
 					r->probe_hits[i]++;
 				i++;
 			}
Signature · 1 line
2.47.3
maintainer tree notice
#28 lore raw

+ mm-damon-paddr-support-report_made-type-probe-filter.patch added to mm-new branch

The patch titled Subject: mm/damon/paddr: support REPORT_MADE type probe filter has been added to the -mm mm-new branch. Its filename is mm-damon-paddr-support-report_made-type-probe-filter.patch

The patch titled
Subject: mm/damon/paddr: support REPORT_MADE type probe filter
has been added to the -mm mm-new branch. Its filename is
mm-damon-paddr-support-report_made-type-probe-filter.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-paddr-support-report_made-type-probe-filter.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: mm/damon/paddr: support REPORT_MADE type probe filter
Date: Tue, 24 Nov 2026 07:36:20 -0800

Add a support of DAMON_FILTER_TYPE_REPORT_MADE type probe filter to the physical address space operation set. Use the DAMON core API function, damon_report_exist() for the core report search functionality. Set the time range as the last sampling interval. Pass damon_ctx to the filter matching function for getting the sampling interval.

 mm/damon/paddr.c |   17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
mm/damon/paddr.c renamed from mm/damon/paddr.c~mm-damon-paddr-support-report_made-type-probe-filter +13 -4
@@ -140,9 +140,10 @@ static void damon_pa_prep_probes(struct
 }
 
 static bool damon_pa_filter_match(struct damon_filter *filter,
-		struct folio *folio)
+		struct folio *folio, phys_addr_t pa, struct damon_ctx *ctx)
 {
 	bool matched = false;
+	struct damon_addr_range addr_range;
 
 	switch (filter->type) {
 	case DAMON_FILTER_TYPE_PGIDLE_UNSET:
@@ -157,19 +158,27 @@ static bool damon_pa_filter_match(struct
 		else
 			matched = damon_folio_young(folio) == false;
 		break;
+	case DAMON_FILTER_TYPE_REPORT_MADE:
+		addr_range.start = damon_pa_core_addr(pa, ctx->addr_unit);
+		addr_range.end = addr_range.start + 1;
+		matched = damon_report_exist(filter->report_type, &addr_range,
+				jiffies -
+				usecs_to_jiffies(ctx->attrs.sample_interval));
+		break;
 	default:
 		return damon_ops_filter_match(filter, folio);
 	}
 	return matched == filter->matching;
 }
 
-static bool damon_pa_filter_pass(struct folio *folio, struct damon_probe *p)
+static bool damon_pa_filter_pass(struct folio *folio, struct damon_probe *p,
+		phys_addr_t pa, struct damon_ctx *ctx)
 {
 	struct damon_filter *f;
 	bool pass = true;
 
 	damon_for_each_filter(f, p) {
-		if (damon_pa_filter_match(f, folio)) {
+		if (damon_pa_filter_match(f, folio, pa, ctx)) {
 			pass = f->allow;
 			break;
 		}
@@ -199,7 +208,7 @@ static unsigned int damon_pa_apply_probe
 					ctx->addr_unit);
 			folio = damon_get_folio(PHYS_PFN(pa));
 			damon_for_each_probe(p, ctx) {
-				if (damon_pa_filter_pass(folio, p))
+				if (damon_pa_filter_pass(folio, p, pa, ctx))
 					r->probe_hits[i]++;
 				i++;
 			}

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#29 lore raw

PATCH v2 15/27 mm/damon/sysfs: add filter_report_type file under probe filter directory

In reply to SJ Park

Add a sysfs file, filter_report_type, under probe filter directory. It receives damon_report_type from the user. Reuse damon_sysfs_report_type_name struct for user keyword matching. Move the definition instead of forward declaration, as the code change is small enough at this stage.

---
 mm/damon/sysfs.c | 61 +++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 52 insertions(+), 9 deletions(-)
mm/damon/sysfs.c +52 -9
index 7cdbe2fedf7d8..ca971cf1dcf6d 100644
@@ -977,6 +977,7 @@ struct damon_sysfs_filter {
 	char *path;
 	unsigned long range_min;
 	unsigned long range_max;
+	enum damon_report_type report_type;
 };
 
 static struct damon_sysfs_filter *damon_sysfs_filter_alloc(void)
@@ -1175,6 +1176,53 @@ static ssize_t max_store(struct kobject *kobj,
 	return err ? err : count;
 }
 
+struct damon_sysfs_report_type_name {
+	enum damon_report_type type;
+	char *name;
+};
+
+static const struct damon_sysfs_report_type_name
+damon_sysfs_report_type_names[] = {
+};
+
+static ssize_t filter_report_type_show(struct kobject *kobj,
+		struct kobj_attribute *attr, char *buf)
+{
+	struct damon_sysfs_filter *filter = container_of(kobj,
+			struct damon_sysfs_filter, kobj);
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(damon_sysfs_report_type_names); i++) {
+		const struct damon_sysfs_report_type_name *type_name;
+
+		type_name = &damon_sysfs_report_type_names[i];
+		if (type_name->type == filter->report_type)
+			return sysfs_emit(buf, "%s\n", type_name->name);
+	}
+	return -EINVAL;
+}
+
+static ssize_t filter_report_type_store(struct kobject *kobj,
+		struct kobj_attribute *attr, const char *buf, size_t count)
+{
+	struct damon_sysfs_filter *filter = container_of(kobj,
+			struct damon_sysfs_filter, kobj);
+	ssize_t ret = -EINVAL;
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(damon_sysfs_report_type_names); i++) {
+		const struct damon_sysfs_report_type_name *type_name;
+
+		type_name = &damon_sysfs_report_type_names[i];
+		if (sysfs_streq(buf, type_name->name)) {
+			filter->report_type = type_name->type;
+			ret = count;
+			break;
+		}
+	}
+	return ret;
+}
+
 static void damon_sysfs_filter_release(struct kobject *kobj)
 {
 	struct damon_sysfs_filter *filter = container_of(kobj,
@@ -1202,6 +1250,9 @@ static struct kobj_attribute damon_sysfs_filter_min_attr =
 static struct kobj_attribute damon_sysfs_filter_max_attr =
 		__ATTR_RW_MODE(max, 0600);
 
+static struct kobj_attribute damon_sysfs_filter_filter_report_type_attr =
+		__ATTR_RW_MODE(filter_report_type, 0600);
+
 static struct attribute *damon_sysfs_filter_attrs[] = {
 	&damon_sysfs_filter_type_attr.attr,
 	&damon_sysfs_filter_matching_attr.attr,
@@ -1209,6 +1260,7 @@ static struct attribute *damon_sysfs_filter_attrs[] = {
 	&damon_sysfs_filter_path_attr.attr,
 	&damon_sysfs_filter_min_attr.attr,
 	&damon_sysfs_filter_max_attr.attr,
+	&damon_sysfs_filter_filter_report_type_attr.attr,
 	NULL,
 };
 ATTRIBUTE_GROUPS(damon_sysfs_filter);
@@ -2992,15 +3044,6 @@ static struct damon_sysfs_producer *damon_sysfs_producer_alloc(void)
 	return kzalloc_obj(struct damon_sysfs_producer);
 }
 
-struct damon_sysfs_report_type_name {
-	enum damon_report_type type;
-	char *name;
-};
-
-static const struct damon_sysfs_report_type_name
-damon_sysfs_report_type_names[] = {
-};
-
 static ssize_t report_type_show(struct kobject *kobj,
 		struct kobj_attribute *attr, char *buf)
 {
Signature · 1 line
2.47.3
maintainer tree notice
#30 lore raw

+ mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch added to mm-new branch

The patch titled Subject: mm/damon/sysfs: add filter_report_type file under probe filter directory has been added to the -mm mm-new branch. Its filename is…

The patch titled
Subject: mm/damon/sysfs: add filter_report_type file under probe filter directory
has been added to the -mm mm-new branch. Its filename is
mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: mm/damon/sysfs: add filter_report_type file under probe filter directory
Date: Tue, 24 Nov 2026 07:36:21 -0800

Add a sysfs file, filter_report_type, under probe filter directory. It receives damon_report_type from the user. Reuse damon_sysfs_report_type_name struct for user keyword matching. Move the definition instead of forward declaration, as the code change is small enough at this stage.

 mm/damon/sysfs.c |   61 ++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 52 insertions(+), 9 deletions(-)
mm/damon/sysfs.c renamed from mm/damon/sysfs.c~mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory +52 -9
@@ -977,6 +977,7 @@ struct damon_sysfs_filter {
 	char *path;
 	unsigned long range_min;
 	unsigned long range_max;
+	enum damon_report_type report_type;
 };
 
 static struct damon_sysfs_filter *damon_sysfs_filter_alloc(void)
@@ -1175,6 +1176,53 @@ static ssize_t max_store(struct kobject
 	return err ? err : count;
 }
 
+struct damon_sysfs_report_type_name {
+	enum damon_report_type type;
+	char *name;
+};
+
+static const struct damon_sysfs_report_type_name
+damon_sysfs_report_type_names[] = {
+};
+
+static ssize_t filter_report_type_show(struct kobject *kobj,
+		struct kobj_attribute *attr, char *buf)
+{
+	struct damon_sysfs_filter *filter = container_of(kobj,
+			struct damon_sysfs_filter, kobj);
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(damon_sysfs_report_type_names); i++) {
+		const struct damon_sysfs_report_type_name *type_name;
+
+		type_name = &damon_sysfs_report_type_names[i];
+		if (type_name->type == filter->report_type)
+			return sysfs_emit(buf, "%s\n", type_name->name);
+	}
+	return -EINVAL;
+}
+
+static ssize_t filter_report_type_store(struct kobject *kobj,
+		struct kobj_attribute *attr, const char *buf, size_t count)
+{
+	struct damon_sysfs_filter *filter = container_of(kobj,
+			struct damon_sysfs_filter, kobj);
+	ssize_t ret = -EINVAL;
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(damon_sysfs_report_type_names); i++) {
+		const struct damon_sysfs_report_type_name *type_name;
+
+		type_name = &damon_sysfs_report_type_names[i];
+		if (sysfs_streq(buf, type_name->name)) {
+			filter->report_type = type_name->type;
+			ret = count;
+			break;
+		}
+	}
+	return ret;
+}
+
 static void damon_sysfs_filter_release(struct kobject *kobj)
 {
 	struct damon_sysfs_filter *filter = container_of(kobj,
@@ -1202,6 +1250,9 @@ static struct kobj_attribute damon_sysfs
 static struct kobj_attribute damon_sysfs_filter_max_attr =
 		__ATTR_RW_MODE(max, 0600);
 
+static struct kobj_attribute damon_sysfs_filter_filter_report_type_attr =
+		__ATTR_RW_MODE(filter_report_type, 0600);
+
 static struct attribute *damon_sysfs_filter_attrs[] = {
 	&damon_sysfs_filter_type_attr.attr,
 	&damon_sysfs_filter_matching_attr.attr,
@@ -1209,6 +1260,7 @@ static struct attribute *damon_sysfs_fil
 	&damon_sysfs_filter_path_attr.attr,
 	&damon_sysfs_filter_min_attr.attr,
 	&damon_sysfs_filter_max_attr.attr,
+	&damon_sysfs_filter_filter_report_type_attr.attr,
 	NULL,
 };
 ATTRIBUTE_GROUPS(damon_sysfs_filter);
@@ -2992,15 +3044,6 @@ static struct damon_sysfs_producer *damo
 	return kzalloc_obj(struct damon_sysfs_producer);
 }
 
-struct damon_sysfs_report_type_name {
-	enum damon_report_type type;
-	char *name;
-};
-
-static const struct damon_sysfs_report_type_name
-damon_sysfs_report_type_names[] = {
-};
-
 static ssize_t report_type_show(struct kobject *kobj,
 		struct kobj_attribute *attr, char *buf)
 {

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#31 lore raw

PATCH v2 16/27 mm/damon/sysfs: support REPORT_MADE type probe filter setup

In reply to SJ Park

Accept user keyword "report_made" to probe filter type file. Set the damon_filter->type as REPORT_MADE for the input. Setup damon_filter->report_type with the filter_report_type user input.

---
 mm/damon/sysfs.c | 6 ++++++
 1 file changed, 6 insertions(+)
mm/damon/sysfs.c +6 -0
index ca971cf1dcf6d..1c171af4590a8 100644
@@ -1016,6 +1016,10 @@ damon_sysfs_filter_type_names[] = {
 		.type = DAMON_FILTER_TYPE_ACTIVE,
 		.name = "active",
 	},
+	{
+		.type = DAMON_FILTER_TYPE_REPORT_MADE,
+		.name = "report_made",
+	},
 };
 
 static ssize_t type_show(struct kobject *kobj,
@@ -2336,6 +2340,8 @@ static int damon_sysfs_set_filters(struct damon_probe *probe,
 		} else if (filter->type == DAMON_FILTER_TYPE_HUGEPAGE_SIZE) {
 			filter->range_min = sys_filter->range_min;
 			filter->range_max = sys_filter->range_max;
+		} else if (filter->type == DAMON_FILTER_TYPE_REPORT_MADE) {
+			filter->report_type = sys_filter->report_type;
 		}
 		damon_add_filter(probe, filter);
 	}
Signature · 1 line
2.47.3
maintainer tree notice
#32 lore raw

+ mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch added to mm-new branch

The patch titled Subject: mm/damon/sysfs: support REPORT_MADE type probe filter setup has been added to the -mm mm-new branch. Its filename is…

The patch titled
Subject: mm/damon/sysfs: support REPORT_MADE type probe filter setup
has been added to the -mm mm-new branch. Its filename is
mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: mm/damon/sysfs: support REPORT_MADE type probe filter setup
Date: Tue, 24 Nov 2026 07:36:22 -0800

Accept user keyword "report_made" to probe filter type file. Set the damon_filter->type as REPORT_MADE for the input. Setup damon_filter->report_type with the filter_report_type user input.

 mm/damon/sysfs.c |    6 ++++++
 1 file changed, 6 insertions(+)
mm/damon/sysfs.c renamed from mm/damon/sysfs.c~mm-damon-sysfs-support-report_made-type-probe-filter-setup +6 -0
@@ -1016,6 +1016,10 @@ damon_sysfs_filter_type_names[] = {
 		.type = DAMON_FILTER_TYPE_ACTIVE,
 		.name = "active",
 	},
+	{
+		.type = DAMON_FILTER_TYPE_REPORT_MADE,
+		.name = "report_made",
+	},
 };
 
 static ssize_t type_show(struct kobject *kobj,
@@ -2336,6 +2340,8 @@ static int damon_sysfs_set_filters(struc
 		} else if (filter->type == DAMON_FILTER_TYPE_HUGEPAGE_SIZE) {
 			filter->range_min = sys_filter->range_min;
 			filter->range_max = sys_filter->range_max;
+		} else if (filter->type == DAMON_FILTER_TYPE_REPORT_MADE) {
+			filter->report_type = sys_filter->report_type;
 		}
 		damon_add_filter(probe, filter);
 	}

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#33 lore raw

PATCH v2 17/27 Docs/mm/damon/design: update for report_made probe filter type

In reply to SJ Park

Update DAMON design document for the newly added data attribute report existence type probe filter.

---
 Documentation/mm/damon/design.rst | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/mm/damon/design.rst +6 -0
index 59dba2fe0dfbf..7ead5716d0c30 100644
@@ -303,6 +303,8 @@ supported filter types.  Currently below filter types are supported.
 - ``hugepage_size``: Matches if the page for the memory is a part of a hugepage
   of a given size range.
 - ``active``: Same as that for DAMOS filters.
+- ``report_made``: Matches if a :ref:`report <damon_design_attr_reporting>` for
+  the memory is made in last sampling interval.
 
 If such probes are registered, DAMON executes the probes for each region's
 sampling memory when it does the access :ref:`sampling
@@ -382,6 +384,10 @@ depending on the type of the report.
 
 For now, no report type is supported.
 
+The data attribute probe supports the reports.  The probes can be configured to
+hit for a given memory region if a specific type of valid reports that are
+associated with the probing memory exist in the reports queue.
+
 Dynamic Target Space Updates Handling
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Signature · 1 line
2.47.3
maintainer tree notice
#34 lore raw

+ docs-mm-damon-design-update-for-report_made-probe-filter-type.patch added to mm-new branch

The patch titled Subject: Docs/mm/damon/design: update for report_made probe filter type has been added to the -mm mm-new branch. Its filename is…

The patch titled
Subject: Docs/mm/damon/design: update for report_made probe filter type
has been added to the -mm mm-new branch. Its filename is
docs-mm-damon-design-update-for-report_made-probe-filter-type.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/docs-mm-damon-design-update-for-report_made-probe-filter-type.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: Docs/mm/damon/design: update for report_made probe filter type
Date: Tue, 24 Nov 2026 07:36:23 -0800

Update DAMON design document for the newly added data attribute report existence type probe filter.

 Documentation/mm/damon/design.rst |    6 ++++++
 1 file changed, 6 insertions(+)
Documentation/mm/damon/design.rst renamed from Documentation/mm/damon/design.rst~docs-mm-damon-design-update-for-report_made-probe-filter-type +6 -0
@@ -303,6 +303,8 @@ supported filter types.  Currently below
 - ``hugepage_size``: Matches if the page for the memory is a part of a hugepage
   of a given size range.
 - ``active``: Same as that for DAMOS filters.
+- ``report_made``: Matches if a :ref:`report <damon_design_attr_reporting>` for
+  the memory is made in last sampling interval.
 
 If such probes are registered, DAMON executes the probes for each region's
 sampling memory when it does the access :ref:`sampling
@@ -382,6 +384,10 @@ depending on the type of the report.
 
 For now, no report type is supported.
 
+The data attribute probe supports the reports.  The probes can be configured to
+hit for a given memory region if a specific type of valid reports that are
+associated with the probing memory exist in the reports queue.
+
 Dynamic Target Space Updates Handling
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#35 lore raw

PATCH v2 18/27 Docs/admin-guide/mm/damon/usage: update for REPORT_MADE probe filter

In reply to SJ Park

Update DAMON usage document for the newly added REPORT_MADE type probe filter support.

---
 Documentation/admin-guide/mm/damon/usage.rst | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Documentation/admin-guide/mm/damon/usage.rst +5 -1
index 5e0633b5879de..dd752b81efe34 100644
@@ -78,7 +78,7 @@ comma (",").
     │ │ │ │ │ │ │ │ │ 0/prep_action
     │ │ │ │ │ │ │ │ │ ...
     │ │ │ │ │ │ │ │ filters/nr_filters
-    │ │ │ │ │ │ │ │ │ 0/type,matching,allow,path,min,max
+    │ │ │ │ │ │ │ │ │ 0/type,matching,allow,path,min,max,filter_report_type
     │ │ │ │ │ │ │ │ │ ...
     │ │ │ │ │ │ │ ...
     │ │ │ │ │ :ref:`targets <sysfs_targets>`/nr_targets
@@ -320,6 +320,10 @@ filter <sysfs_filters>`.  When the filter ``type`` is ``hugepage_size``,
 ``min`` and ``max`` files act as files of the same names for :ref:`DAMOS
 filter <sysfs_filters>`.
 
+When the filter ``type`` is ``report_made``, the :ref:`report
+<damon_design_attr_reporting>` type for the filtering should also be specified
+by writing the type name to ``filter_report_type`` file.
+
 .. _sysfs_targets:
 
 contexts/<N>/targets/
Signature · 1 line
2.47.3
maintainer tree notice
#36 lore raw

+ docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch added to mm-new branch

The patch titled Subject: Docs/admin-guide/mm/damon/usage: update for REPORT_MADE probe filter has been added to the -mm mm-new branch. Its filename is…

The patch titled
Subject: Docs/admin-guide/mm/damon/usage: update for REPORT_MADE probe filter
has been added to the -mm mm-new branch. Its filename is
docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: Docs/admin-guide/mm/damon/usage: update for REPORT_MADE probe filter
Date: Tue, 24 Nov 2026 07:36:24 -0800

Update DAMON usage document for the newly added REPORT_MADE type probe filter support.

 Documentation/admin-guide/mm/damon/usage.rst |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Documentation/admin-guide/mm/damon/usage.rst renamed from Documentation/admin-guide/mm/damon/usage.rst~docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter +5 -1
@@ -78,7 +78,7 @@ comma (",").
     │ │ │ │ │ │ │ │ │ 0/prep_action
     │ │ │ │ │ │ │ │ │ ...
     │ │ │ │ │ │ │ │ filters/nr_filters
-    │ │ │ │ │ │ │ │ │ 0/type,matching,allow,path,min,max
+    │ │ │ │ │ │ │ │ │ 0/type,matching,allow,path,min,max,filter_report_type
     │ │ │ │ │ │ │ │ │ ...
     │ │ │ │ │ │ │ ...
     │ │ │ │ │ :ref:`targets <sysfs_targets>`/nr_targets
@@ -320,6 +320,10 @@ filter <sysfs_filters>`.  When the filte
 ``min`` and ``max`` files act as files of the same names for :ref:`DAMOS
 filter <sysfs_filters>`.
 
+When the filter ``type`` is ``report_made``, the :ref:`report
+<damon_design_attr_reporting>` type for the filtering should also be specified
+by writing the type name to ``filter_report_type`` file.
+
 .. _sysfs_targets:
 
 contexts/<N>/targets/

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#37 lore raw

PATCH v2 19/27 Docs/ABI/damon: update for REPORT_MADE probe filter

In reply to SJ Park

Update DAMON ABI document for the newly added REPORT_MADE type probe filter support.

---
 Documentation/ABI/testing/sysfs-kernel-mm-damon | 7 +++++++
 1 file changed, 7 insertions(+)
Documentation/ABI/testing/sysfs-kernel-mm-damon +7 -0
index b5e5004ec9fb7..692827674a773 100644
@@ -233,6 +233,13 @@ Description:	Writing 'Y' or 'N' to this file sets whether to allow or reject
 		hitting the probe for the memory that satisfies the 'type' and
 		the 'matching' of the directory.
 
+What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/probes/<P>/filters/<F>/filter_report_type
+Date:		Nov 2026
+Contact:	SJ Park <[email protected]>
+Description:	If 'report_made' is written to the 'type' file, writing to and
+		reading from this file sets and gets the 'report_type' of the
+		reports that this filter is working for.
+
 What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/nr_targets
 Date:		Mar 2022
 Contact:	SJ Park <[email protected]>
Signature · 1 line
2.47.3
maintainer tree notice
#38 lore raw

+ docs-abi-damon-update-for-report_made-probe-filter.patch added to mm-new branch

The patch titled Subject: Docs/ABI/damon: update for REPORT_MADE probe filter has been added to the -mm mm-new branch. Its filename is docs-abi-damon-update-for-report_made-probe-filter.patch

The patch titled
Subject: Docs/ABI/damon: update for REPORT_MADE probe filter
has been added to the -mm mm-new branch. Its filename is
docs-abi-damon-update-for-report_made-probe-filter.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/docs-abi-damon-update-for-report_made-probe-filter.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: Docs/ABI/damon: update for REPORT_MADE probe filter
Date: Tue, 24 Nov 2026 07:36:25 -0800

Update DAMON ABI document for the newly added REPORT_MADE type probe filter support.

 Documentation/ABI/testing/sysfs-kernel-mm-damon |    7 +++++++
 1 file changed, 7 insertions(+)
Documentation/ABI/testing/sysfs-kernel-mm-damon renamed from Documentation/ABI/testing/sysfs-kernel-mm-damon~docs-abi-damon-update-for-report_made-probe-filter +7 -0
@@ -233,6 +233,13 @@ Description:	Writing 'Y' or 'N' to this
 		hitting the probe for the memory that satisfies the 'type' and
 		the 'matching' of the directory.
 
+What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/monitoring_attrs/probes/<P>/filters/<F>/filter_report_type
+Date:		Nov 2026
+Contact:	SJ Park <[email protected]>
+Description:	If 'report_made' is written to the 'type' file, writing to and
+		reading from this file sets and gets the 'report_type' of the
+		reports that this filter is working for.
+
 What:		/sys/kernel/mm/damon/admin/kdamonds/<K>/contexts/<C>/targets/nr_targets
 Date:		Mar 2022
 Contact:	SJ Park <[email protected]>

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#39 lore raw

PATCH v2 20/27 mm/damon/api: introduce user_report report type

In reply to SJ Park

Users could know some data attribute information and willing to provide that to DAMON. Introduce a new damon_report_type, DAMON_REPORT_TYPE_USER_REPORT, for such user-provided reports.

---
 include/linux/damon.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
include/linux/damon.h +3 -1
index 38efa41b3d1ab..45c82f536da59 100644
@@ -759,9 +759,11 @@ struct damon_intervals_goal {
 
 /**
  * enum damon_report_type - Type of &struct damon_report.
+ *
+ * @DAMON_REPORT_TYPE_USER_REPORT:	User-generated report.
  */
 enum damon_report_type {
-	NR_DAMON_REPORT_TYPES,
+	DAMON_REPORT_TYPE_USER_REPORT,
 };
 
 /**
Signature · 1 line
2.47.3
maintainer tree notice
#40 lore raw

+ mm-damon-api-introduce-user_report-report-type.patch added to mm-new branch

The patch titled Subject: mm/damon/api: introduce user_report report type has been added to the -mm mm-new branch. Its filename is mm-damon-api-introduce-user_report-report-type.patch

The patch titled
Subject: mm/damon/api: introduce user_report report type
has been added to the -mm mm-new branch. Its filename is
mm-damon-api-introduce-user_report-report-type.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-api-introduce-user_report-report-type.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: mm/damon/api: introduce user_report report type
Date: Tue, 24 Nov 2026 07:36:26 -0800

Users could know some data attribute information and willing to provide that to DAMON. Introduce a new damon_report_type, DAMON_REPORT_TYPE_USER_REPORT, for such user-provided reports.

 include/linux/damon.h |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
include/linux/damon.h renamed from include/linux/damon.h~mm-damon-api-introduce-user_report-report-type +3 -1
@@ -759,9 +759,11 @@ struct damon_intervals_goal {
 
 /**
  * enum damon_report_type - Type of &struct damon_report.
+ *
+ * @DAMON_REPORT_TYPE_USER_REPORT:	User-generated report.
  */
 enum damon_report_type {
-	NR_DAMON_REPORT_TYPES,
+	DAMON_REPORT_TYPE_USER_REPORT,
 };
 
 /**

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#41 lore raw

PATCH v2 21/27 mm/damon/sysfs: add user_report support for report type input

In reply to SJ Park

Extend the mapping list for data attribute report types and user keywords, for the USER_REPORT report type. Use "user_report" as the matching user keyword.

---
 mm/damon/sysfs.c | 4 ++++
 1 file changed, 4 insertions(+)
mm/damon/sysfs.c +4 -0
index 1c171af4590a8..b4d898ec0c9f7 100644
@@ -1187,6 +1187,10 @@ struct damon_sysfs_report_type_name {
 
 static const struct damon_sysfs_report_type_name
 damon_sysfs_report_type_names[] = {
+	{
+		.type = DAMON_REPORT_TYPE_USER_REPORT,
+		.name = "user_report",
+	},
 };
 
 static ssize_t filter_report_type_show(struct kobject *kobj,
Signature · 1 line
2.47.3
maintainer tree notice
#42 lore raw

+ mm-damon-sysfs-add-user_report-support-for-report-type-input.patch added to mm-new branch

The patch titled Subject: mm/damon/sysfs: add user_report support for report type input has been added to the -mm mm-new branch. Its filename is…

The patch titled
Subject: mm/damon/sysfs: add user_report support for report type input
has been added to the -mm mm-new branch. Its filename is
mm-damon-sysfs-add-user_report-support-for-report-type-input.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-sysfs-add-user_report-support-for-report-type-input.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: mm/damon/sysfs: add user_report support for report type input
Date: Tue, 24 Nov 2026 07:36:27 -0800

Extend the mapping list for data attribute report types and user keywords, for the USER_REPORT report type. Use "user_report" as the matching user keyword.

 mm/damon/sysfs.c |    4 ++++
 1 file changed, 4 insertions(+)
mm/damon/sysfs.c renamed from mm/damon/sysfs.c~mm-damon-sysfs-add-user_report-support-for-report-type-input +4 -0
@@ -1187,6 +1187,10 @@ struct damon_sysfs_report_type_name {
 
 static const struct damon_sysfs_report_type_name
 damon_sysfs_report_type_names[] = {
+	{
+		.type = DAMON_REPORT_TYPE_USER_REPORT,
+		.name = "user_report",
+	},
 };
 
 static ssize_t filter_report_type_show(struct kobject *kobj,

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#43 lore raw

PATCH v2 22/27 mm/damon/sysfs: implement report producer addr_{start,end} files

In reply to SJ Park

Implement addr_start and addr_end sysfs files under report producer directory. Those set and get the address range of the user_report type data attribute reports.

---
 mm/damon/sysfs.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
mm/damon/sysfs.c +45 -0
index b4d898ec0c9f7..5f9bb1955dfd5 100644
@@ -3047,6 +3047,7 @@ struct damon_sysfs_producer {
 	struct kobject kobj;
 	enum damon_report_type report_type;
 	bool enabled;
+	struct damon_addr_range addr_range;
 };
 
 static struct damon_sysfs_producer *damon_sysfs_producer_alloc(void)
@@ -3116,6 +3117,44 @@ static ssize_t producer_state_store(struct kobject *kobj,
 	return count;
 }
 
+static ssize_t addr_start_show(struct kobject *kobj,
+		struct kobj_attribute *attr, char *buf)
+{
+	struct damon_sysfs_producer *producer = container_of(kobj,
+			struct damon_sysfs_producer, kobj);
+
+	return sysfs_emit(buf, "%lu\n", producer->addr_range.start);
+}
+
+static ssize_t addr_start_store(struct kobject *kobj,
+		struct kobj_attribute *attr, const char *buf, size_t count)
+{
+	struct damon_sysfs_producer *producer = container_of(kobj,
+			struct damon_sysfs_producer, kobj);
+	int err = kstrtoul(buf, 0, &producer->addr_range.start);
+
+	return err ? err : count;
+}
+
+static ssize_t addr_end_show(struct kobject *kobj,
+		struct kobj_attribute *attr, char *buf)
+{
+	struct damon_sysfs_producer *producer = container_of(kobj,
+			struct damon_sysfs_producer, kobj);
+
+	return sysfs_emit(buf, "%lu\n", producer->addr_range.end);
+}
+
+static ssize_t addr_end_store(struct kobject *kobj,
+		struct kobj_attribute *attr, const char *buf, size_t count)
+{
+	struct damon_sysfs_producer *producer = container_of(kobj,
+			struct damon_sysfs_producer, kobj);
+	int err = kstrtoul(buf, 0, &producer->addr_range.end);
+
+	return err ? err : count;
+}
+
 static void damon_sysfs_producer_release(struct kobject *kobj)
 {
 	struct damon_sysfs_producer *producer = container_of(kobj,
@@ -3127,10 +3166,16 @@ static struct kobj_attribute damon_sysfs_producer_report_type_attr =
 		__ATTR_RW_MODE(report_type, 0600);
 static struct kobj_attribute damon_sysfs_producer_producer_state_type_attr =
 		__ATTR_RW_MODE(producer_state, 0600);
+static struct kobj_attribute damon_sysfs_producer_addr_start_type_attr =
+		__ATTR_RW_MODE(addr_start, 0600);
+static struct kobj_attribute damon_sysfs_producer_addr_end_type_attr =
+		__ATTR_RW_MODE(addr_end, 0600);
 
 static struct attribute *damon_sysfs_producer_attrs[] = {
 	&damon_sysfs_producer_report_type_attr.attr,
 	&damon_sysfs_producer_producer_state_type_attr.attr,
+	&damon_sysfs_producer_addr_start_type_attr.attr,
+	&damon_sysfs_producer_addr_end_type_attr.attr,
 	NULL,
 };
 ATTRIBUTE_GROUPS(damon_sysfs_producer);
Signature · 1 line
2.47.3
maintainer tree notice
#44 lore raw

+ mm-damon-sysfs-implement-report-producer-addr_startend-files.patch added to mm-new branch

The patch titled Subject: mm/damon/sysfs: implement report producer addr_{start,end} files has been added to the -mm mm-new branch. Its filename is…

The patch titled
Subject: mm/damon/sysfs: implement report producer addr_{start,end} files
has been added to the -mm mm-new branch. Its filename is
mm-damon-sysfs-implement-report-producer-addr_startend-files.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-sysfs-implement-report-producer-addr_startend-files.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: mm/damon/sysfs: implement report producer addr_{start,end} files
Date: Tue, 24 Nov 2026 07:36:28 -0800

Implement addr_start and addr_end sysfs files under report producer directory. Those set and get the address range of the user_report type data attribute reports.

 mm/damon/sysfs.c |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
mm/damon/sysfs.c renamed from mm/damon/sysfs.c~mm-damon-sysfs-implement-report-producer-addr_startend-files +45 -0
@@ -3047,6 +3047,7 @@ struct damon_sysfs_producer {
 	struct kobject kobj;
 	enum damon_report_type report_type;
 	bool enabled;
+	struct damon_addr_range addr_range;
 };
 
 static struct damon_sysfs_producer *damon_sysfs_producer_alloc(void)
@@ -3116,6 +3117,44 @@ static ssize_t producer_state_store(stru
 	return count;
 }
 
+static ssize_t addr_start_show(struct kobject *kobj,
+		struct kobj_attribute *attr, char *buf)
+{
+	struct damon_sysfs_producer *producer = container_of(kobj,
+			struct damon_sysfs_producer, kobj);
+
+	return sysfs_emit(buf, "%lu\n", producer->addr_range.start);
+}
+
+static ssize_t addr_start_store(struct kobject *kobj,
+		struct kobj_attribute *attr, const char *buf, size_t count)
+{
+	struct damon_sysfs_producer *producer = container_of(kobj,
+			struct damon_sysfs_producer, kobj);
+	int err = kstrtoul(buf, 0, &producer->addr_range.start);
+
+	return err ? err : count;
+}
+
+static ssize_t addr_end_show(struct kobject *kobj,
+		struct kobj_attribute *attr, char *buf)
+{
+	struct damon_sysfs_producer *producer = container_of(kobj,
+			struct damon_sysfs_producer, kobj);
+
+	return sysfs_emit(buf, "%lu\n", producer->addr_range.end);
+}
+
+static ssize_t addr_end_store(struct kobject *kobj,
+		struct kobj_attribute *attr, const char *buf, size_t count)
+{
+	struct damon_sysfs_producer *producer = container_of(kobj,
+			struct damon_sysfs_producer, kobj);
+	int err = kstrtoul(buf, 0, &producer->addr_range.end);
+
+	return err ? err : count;
+}
+
 static void damon_sysfs_producer_release(struct kobject *kobj)
 {
 	struct damon_sysfs_producer *producer = container_of(kobj,
@@ -3127,10 +3166,16 @@ static struct kobj_attribute damon_sysfs
 		__ATTR_RW_MODE(report_type, 0600);
 static struct kobj_attribute damon_sysfs_producer_producer_state_type_attr =
 		__ATTR_RW_MODE(producer_state, 0600);
+static struct kobj_attribute damon_sysfs_producer_addr_start_type_attr =
+		__ATTR_RW_MODE(addr_start, 0600);
+static struct kobj_attribute damon_sysfs_producer_addr_end_type_attr =
+		__ATTR_RW_MODE(addr_end, 0600);
 
 static struct attribute *damon_sysfs_producer_attrs[] = {
 	&damon_sysfs_producer_report_type_attr.attr,
 	&damon_sysfs_producer_producer_state_type_attr.attr,
+	&damon_sysfs_producer_addr_start_type_attr.attr,
+	&damon_sysfs_producer_addr_end_type_attr.attr,
 	NULL,
 };
 ATTRIBUTE_GROUPS(damon_sysfs_producer);

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#45 lore raw

PATCH v2 23/27 mm/damon/sysfs: implement submit command for report producer

In reply to SJ Park

Let users manually submit a report of a data attribute for a given address range of memory. Let producer_state receive "submit" input for that. For the input, generate the report based on user inputs that are written to the appropriate sysfs files and submit to DAMON using the core API, damon_submit_report().

---
 mm/damon/sysfs.c | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)
mm/damon/sysfs.c +16 -3
index 5f9bb1955dfd5..0049aac6ab974 100644
@@ -3107,13 +3107,26 @@ static ssize_t producer_state_store(struct kobject *kobj,
 {
 	struct damon_sysfs_producer *producer = container_of(kobj,
 			struct damon_sysfs_producer, kobj);
+	struct damon_report report;
+	int err;
 
-	if (sysfs_streq(buf, "on"))
+	if (sysfs_streq(buf, "on")) {
 		producer->enabled = true;
-	else if (sysfs_streq(buf, "off"))
+	} else if (sysfs_streq(buf, "off")) {
 		producer->enabled = false;
-	else
+	} else if (sysfs_streq(buf, "submit")) {
+		if (!producer->enabled)
+			return -EINVAL;
+		if (producer->report_type != DAMON_REPORT_TYPE_USER_REPORT)
+			return -EINVAL;
+		report.type = DAMON_REPORT_TYPE_USER_REPORT;
+		report.addr_range = producer->addr_range;
+		err = damon_submit_report(&report);
+		if (err)
+			return err;
+	} else {
 		return -EINVAL;
+	}
 	return count;
 }
 
Signature · 1 line
2.47.3
maintainer tree notice
#46 lore raw

+ mm-damon-sysfs-implement-submit-command-for-report-producer.patch added to mm-new branch

The patch titled Subject: mm/damon/sysfs: implement submit command for report producer has been added to the -mm mm-new branch. Its filename is…

The patch titled
Subject: mm/damon/sysfs: implement submit command for report producer
has been added to the -mm mm-new branch. Its filename is
mm-damon-sysfs-implement-submit-command-for-report-producer.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-sysfs-implement-submit-command-for-report-producer.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: mm/damon/sysfs: implement submit command for report producer
Date: Tue, 24 Nov 2026 07:36:29 -0800

Let users manually submit a report of a data attribute for a given address range of memory. Let producer_state receive "submit" input for that. For the input, generate the report based on user inputs that are written to the appropriate sysfs files and submit to DAMON using the core API, damon_submit_report().

 mm/damon/sysfs.c |   19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)
mm/damon/sysfs.c renamed from mm/damon/sysfs.c~mm-damon-sysfs-implement-submit-command-for-report-producer +16 -3
@@ -3107,13 +3107,26 @@ static ssize_t producer_state_store(stru
 {
 	struct damon_sysfs_producer *producer = container_of(kobj,
 			struct damon_sysfs_producer, kobj);
+	struct damon_report report;
+	int err;
 
-	if (sysfs_streq(buf, "on"))
+	if (sysfs_streq(buf, "on")) {
 		producer->enabled = true;
-	else if (sysfs_streq(buf, "off"))
+	} else if (sysfs_streq(buf, "off")) {
 		producer->enabled = false;
-	else
+	} else if (sysfs_streq(buf, "submit")) {
+		if (!producer->enabled)
+			return -EINVAL;
+		if (producer->report_type != DAMON_REPORT_TYPE_USER_REPORT)
+			return -EINVAL;
+		report.type = DAMON_REPORT_TYPE_USER_REPORT;
+		report.addr_range = producer->addr_range;
+		err = damon_submit_report(&report);
+		if (err)
+			return err;
+	} else {
 		return -EINVAL;
+	}
 	return count;
 }
 

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#47 lore raw

PATCH v2 24/27 selftests/damon/sysfs.sh: add basic tests for admin/reports/

In reply to SJ Park

Update sysfs.sh DAMON selftest to cover basic file operations for the sysfs files under the admin/reports/ directory.

---
 tools/testing/selftests/damon/sysfs.sh | 52 ++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
tools/testing/selftests/damon/sysfs.sh +52 -0
index 1cc7ab2d7e22f..577953ee4e631 100755
@@ -510,6 +510,57 @@ test_kdamonds()
 	ensure_dir "$kdamonds_dir/1" "not_exist"
 }
 
+test_producer()
+{
+	producer_dir=$1
+	ensure_file "$producer_dir/report_type" "exist" "600"
+	ensure_write_succ "$producer_dir/report_type" "user_report" \
+		"valid input"
+	ensure_write_fail "$producer_dir/report_type" "foo" "invlid input"
+
+	ensure_file "$producer_dir/producer_state" "exist" "600"
+	ensure_write_succ "$producer_dir/producer_state" "on" "valid input"
+	ensure_write_succ "$producer_dir/producer_state" "submit" "valid input"
+	ensure_write_succ "$producer_dir/producer_state" "off" "valid input"
+	ensure_write_fail "$producer_dir/producer_state" "foo" "invalid input"
+
+	ensure_file "$producer_dir/addr_start" "exist" "600"
+	ensure_write_succ "$producer_dir/addr_start" 123 "valid input"
+	ensure_write_fail "$producer_dir/addr_start" foo "uinvalid input"
+	ensure_write_fail "$producer_dir/addr_start" "1.23" "uinvalid input"
+
+	ensure_file "$producer_dir/addr_end" "exist" "600"
+	ensure_write_succ "$producer_dir/addr_end" 123 "valid input"
+	ensure_write_fail "$producer_dir/addr_end" foo "uinvalid input"
+	ensure_write_fail "$producer_dir/addr_end" "1.23" "uinvalid input"
+}
+
+test_producers()
+{
+	producers_dir=$1
+	ensure_dir "$producers_dir" "exist"
+
+	ensure_file "$producers_dir/nr_producers" "exist" "600"
+
+	ensure_write_succ "$producers_dir/nr_producers" "1" "valid input"
+	test_producer "$producers_dir/0"
+
+	ensure_write_succ "$producers_dir/nr_producers" "2" "valid input"
+	test_producer "$producers_dir/0"
+	test_producer "$producers_dir/1"
+
+	ensure_write_succ "$producers_dir/nr_producers" "0" "valid input"
+	ensure_dir "$producers_dir/0" "not_exist"
+	ensure_dir "$producers_dir/1" "not_exist"
+}
+
+test_reports()
+{
+	reports_dir=$1
+	ensure_dir "$reports_dir" "exist"
+	test_producers "$reports_dir/producers"
+}
+
 test_damon_sysfs()
 {
 	damon_sysfs=$1
@@ -520,6 +571,7 @@ test_damon_sysfs()
 	fi
 
 	test_kdamonds "$damon_sysfs/kdamonds"
+	test_reports "$damon_sysfs/reports"
 }
 
 check_dependencies
Signature · 1 line
2.47.3
maintainer tree notice
#48 lore raw

+ selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch added to mm-new branch

The patch titled Subject: selftests/damon/sysfs.sh: add basic tests for admin/reports/ has been added to the -mm mm-new branch. Its filename is…

The patch titled
Subject: selftests/damon/sysfs.sh: add basic tests for admin/reports/
has been added to the -mm mm-new branch. Its filename is
selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: selftests/damon/sysfs.sh: add basic tests for admin/reports/
Date: Tue, 24 Nov 2026 07:36:30 -0800

Update sysfs.sh DAMON selftest to cover basic file operations for the sysfs files under the admin/reports/ directory.

 tools/testing/selftests/damon/sysfs.sh |   52 +++++++++++++++++++++++
 1 file changed, 52 insertions(+)
tools/testing/selftests/damon/sysfs.sh renamed from tools/testing/selftests/damon/sysfs.sh~selftests-damon-sysfssh-add-basic-tests-for-admin-reports +52 -0
@@ -510,6 +510,57 @@ test_kdamonds()
 	ensure_dir "$kdamonds_dir/1" "not_exist"
 }
 
+test_producer()
+{
+	producer_dir=$1
+	ensure_file "$producer_dir/report_type" "exist" "600"
+	ensure_write_succ "$producer_dir/report_type" "user_report" \
+		"valid input"
+	ensure_write_fail "$producer_dir/report_type" "foo" "invlid input"
+
+	ensure_file "$producer_dir/producer_state" "exist" "600"
+	ensure_write_succ "$producer_dir/producer_state" "on" "valid input"
+	ensure_write_succ "$producer_dir/producer_state" "submit" "valid input"
+	ensure_write_succ "$producer_dir/producer_state" "off" "valid input"
+	ensure_write_fail "$producer_dir/producer_state" "foo" "invalid input"
+
+	ensure_file "$producer_dir/addr_start" "exist" "600"
+	ensure_write_succ "$producer_dir/addr_start" 123 "valid input"
+	ensure_write_fail "$producer_dir/addr_start" foo "uinvalid input"
+	ensure_write_fail "$producer_dir/addr_start" "1.23" "uinvalid input"
+
+	ensure_file "$producer_dir/addr_end" "exist" "600"
+	ensure_write_succ "$producer_dir/addr_end" 123 "valid input"
+	ensure_write_fail "$producer_dir/addr_end" foo "uinvalid input"
+	ensure_write_fail "$producer_dir/addr_end" "1.23" "uinvalid input"
+}
+
+test_producers()
+{
+	producers_dir=$1
+	ensure_dir "$producers_dir" "exist"
+
+	ensure_file "$producers_dir/nr_producers" "exist" "600"
+
+	ensure_write_succ "$producers_dir/nr_producers" "1" "valid input"
+	test_producer "$producers_dir/0"
+
+	ensure_write_succ "$producers_dir/nr_producers" "2" "valid input"
+	test_producer "$producers_dir/0"
+	test_producer "$producers_dir/1"
+
+	ensure_write_succ "$producers_dir/nr_producers" "0" "valid input"
+	ensure_dir "$producers_dir/0" "not_exist"
+	ensure_dir "$producers_dir/1" "not_exist"
+}
+
+test_reports()
+{
+	reports_dir=$1
+	ensure_dir "$reports_dir" "exist"
+	test_producers "$reports_dir/producers"
+}
+
 test_damon_sysfs()
 {
 	damon_sysfs=$1
@@ -520,6 +571,7 @@ test_damon_sysfs()
 	fi
 
 	test_kdamonds "$damon_sysfs/kdamonds"
+	test_reports "$damon_sysfs/reports"
 }
 
 check_dependencies

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#49 lore raw

PATCH v2 25/27 Docs/mm/damon/design: update for user report support

In reply to SJ Park

Update DAMON design document for the newly aded user_report type data attribute reports.

---
 Documentation/mm/damon/design.rst | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
Documentation/mm/damon/design.rst +14 -1
index 7ead5716d0c30..70baeef7ec916 100644
@@ -382,12 +382,25 @@ can generate and submit reports of the given type.  The generations and
 submissions could be done automatically by the kernel or manually by the user,
 depending on the type of the report.
 
-For now, no report type is supported.
+Below report types are supported.
+
+- ``user_report``: User-provided report.  To use this, the user should set the
+  address range of the memory to report for.  This type of report is not
+  automatically generated and submitted to DAMON.  The user should manually
+  generate and submit each report using the interface.
 
 The data attribute probe supports the reports.  The probes can be configured to
 hit for a given memory region if a specific type of valid reports that are
 associated with the probing memory exist in the reports queue.
 
+For example, users can run DAMON in the classical page table accessed bits
+based access monitoring.  In addition to that, users could find hot data that
+might not be able to found by DAMON.  DAMON might not able to find that due to
+limitations in page table accessed bits or its overhead control mechanism.
+Users may be able to find that using their access to workload source code,
+experiment results or other tools.  Users can complement monitoring results by
+feeding the information as user reports.
+
 Dynamic Target Space Updates Handling
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Signature · 1 line
2.47.3
maintainer tree notice
#50 lore raw

+ docs-mm-damon-design-update-for-user-report-support.patch added to mm-new branch

The patch titled Subject: Docs/mm/damon/design: update for user report support has been added to the -mm mm-new branch. Its filename is docs-mm-damon-design-update-for-user-report-support.patch

The patch titled
Subject: Docs/mm/damon/design: update for user report support
has been added to the -mm mm-new branch. Its filename is
docs-mm-damon-design-update-for-user-report-support.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/docs-mm-damon-design-update-for-user-report-support.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: Docs/mm/damon/design: update for user report support
Date: Tue, 24 Nov 2026 07:36:31 -0800

Update DAMON design document for the newly aded user_report type data attribute reports.

 Documentation/mm/damon/design.rst |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
Documentation/mm/damon/design.rst renamed from Documentation/mm/damon/design.rst~docs-mm-damon-design-update-for-user-report-support +14 -1
@@ -382,12 +382,25 @@ can generate and submit reports of the g
 submissions could be done automatically by the kernel or manually by the user,
 depending on the type of the report.
 
-For now, no report type is supported.
+Below report types are supported.
+
+- ``user_report``: User-provided report.  To use this, the user should set the
+  address range of the memory to report for.  This type of report is not
+  automatically generated and submitted to DAMON.  The user should manually
+  generate and submit each report using the interface.
 
 The data attribute probe supports the reports.  The probes can be configured to
 hit for a given memory region if a specific type of valid reports that are
 associated with the probing memory exist in the reports queue.
 
+For example, users can run DAMON in the classical page table accessed bits
+based access monitoring.  In addition to that, users could find hot data that
+might not be able to found by DAMON.  DAMON might not able to find that due to
+limitations in page table accessed bits or its overhead control mechanism.
+Users may be able to find that using their access to workload source code,
+experiment results or other tools.  Users can complement monitoring results by
+feeding the information as user reports.
+
 Dynamic Target Space Updates Handling
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#51 lore raw

PATCH v2 26/27 Docs/admin-guide/mm/damon/usage: update for user_report report support

In reply to SJ Park

Update DAMON usage document for the newly added user_report type data attribute report support.

---
 Documentation/admin-guide/mm/damon/usage.rst | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
Documentation/admin-guide/mm/damon/usage.rst +10 -1
index dd752b81efe34..9312db5973aeb 100644
@@ -120,7 +120,7 @@ comma (",").
     │ │ ...
     │ reports/
     │ │ producers/nr_producers
-    │ │ │ 0/report_type,producer_state
+    │ │ │ 0/report_type,producer_state,addr_start,addr_end
     │ │ │ ...
 
 .. _sysfs_root:
@@ -770,6 +770,15 @@ Users can write below keywords for the producer to the file.
 
 - ``on``: Enable the producer.
 - ``off``: Disable the producer.
+- ``submit``: Generate and submit a new ``user_report`` type report, if
+  ``report_type`` is ``user_report``, and the producer is enabled.
+
+``addr_start`` and ``addr_end`` files are used only for ``user_report`` report
+type.  Those set the address range of memory to manually report .  Users can
+set the start and end address of the address range by writing the addresses to
+the files.  Note that it is open-end range (``[addr_start,addr_end)``) and
+therefore the end address is exclusive.  Reading the files shows the last
+successfully written input.
 
 .. _tracepoint:
 
Signature · 1 line
2.47.3
maintainer tree notice
#52 lore raw

+ docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch added to mm-new branch

The patch titled Subject: Docs/admin-guide/mm/damon/usage: update for user_report report support has been added to the -mm mm-new branch. Its filename is…

The patch titled
Subject: Docs/admin-guide/mm/damon/usage: update for user_report report support
has been added to the -mm mm-new branch. Its filename is
docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: Docs/admin-guide/mm/damon/usage: update for user_report report support
Date: Tue, 24 Nov 2026 07:36:32 -0800

Update DAMON usage document for the newly added user_report type data attribute report support.

 Documentation/admin-guide/mm/damon/usage.rst |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
Documentation/admin-guide/mm/damon/usage.rst renamed from Documentation/admin-guide/mm/damon/usage.rst~docs-admin-guide-mm-damon-usage-update-for-user_report-report-support +10 -1
@@ -120,7 +120,7 @@ comma (",").
     │ │ ...
     │ reports/
     │ │ producers/nr_producers
-    │ │ │ 0/report_type,producer_state
+    │ │ │ 0/report_type,producer_state,addr_start,addr_end
     │ │ │ ...
 
 .. _sysfs_root:
@@ -770,6 +770,15 @@ Users can write below keywords for the p
 
 - ``on``: Enable the producer.
 - ``off``: Disable the producer.
+- ``submit``: Generate and submit a new ``user_report`` type report, if
+  ``report_type`` is ``user_report``, and the producer is enabled.
+
+``addr_start`` and ``addr_end`` files are used only for ``user_report`` report
+type.  Those set the address range of memory to manually report .  Users can
+set the start and end address of the address range by writing the addresses to
+the files.  Note that it is open-end range (``[addr_start,addr_end)``) and
+therefore the end address is exclusive.  Reading the files shows the last
+successfully written input.
 
 .. _tracepoint:
 

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch

author maintainer
#53 lore raw

PATCH v2 27/27 Docs/ABI/damon: update for user_report report support

In reply to SJ Park

Update DAMON ABI document for the newly added user_report type data attribute report support.

---
 Documentation/ABI/testing/sysfs-kernel-mm-damon | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
Documentation/ABI/testing/sysfs-kernel-mm-damon +16 -0
index 692827674a773..125b615e32ec4 100644
@@ -729,3 +729,19 @@ Contact:	SJ Park <[email protected]>
 Description:	A file for requesting actions including enablement and
 		disablement of the producer.  Refer to
 		Documentation/admin-guide/mm/damon/usage.rst for more details.
+
+What:		/sys/kernel/mm/damon/admin/reports/producers/<P>/addr_start
+Date:		Nov 2026
+Contact:	SJ Park <[email protected]>
+Description:	Writing an integer to and reading from this file sets and gets
+		the start address of the report to manually generate and
+		submit, depending on the type of the report producer.  Note
+		that the start address is inclusive.
+
+What:		/sys/kernel/mm/damon/admin/reports/producers/<P>/addr_end
+Date:		Nov 2026
+Contact:	SJ Park <[email protected]>
+Description:	Writing an integer to and reading from this file sets and gets
+		the end address of the report to manually generate and submit,
+		depending on the type of the report producer.  Note that the
+		end address is exclusive.
Signature · 1 line
2.47.3
maintainer tree notice
#54 lore raw

+ docs-abi-damon-update-for-user_report-report-support.patch added to mm-new branch

The patch titled Subject: Docs/ABI/damon: update for user_report report support has been added to the -mm mm-new branch. Its filename is docs-abi-damon-update-for-user_report-report-support.patch

The patch titled
Subject: Docs/ABI/damon: update for user_report report support
has been added to the -mm mm-new branch. Its filename is
docs-abi-damon-update-for-user_report-report-support.patch

This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/docs-abi-damon-update-for-user_report-report-support.patch

This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new.

The mm-new branch of mm.git is not included in linux-next

If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: SJ Park <[email protected]>
Subject: Docs/ABI/damon: update for user_report report support
Date: Tue, 24 Nov 2026 07:36:33 -0800

Update DAMON ABI document for the newly added user_report type data attribute report support.

 Documentation/ABI/testing/sysfs-kernel-mm-damon |   16 ++++++++++++++
 1 file changed, 16 insertions(+)
Documentation/ABI/testing/sysfs-kernel-mm-damon renamed from Documentation/ABI/testing/sysfs-kernel-mm-damon~docs-abi-damon-update-for-user_report-report-support +16 -0
@@ -729,3 +729,19 @@ Contact:	SJ Park <[email protected]>
 Description:	A file for requesting actions including enablement and
 		disablement of the producer.  Refer to
 		Documentation/admin-guide/mm/damon/usage.rst for more details.
+
+What:		/sys/kernel/mm/damon/admin/reports/producers/<P>/addr_start
+Date:		Nov 2026
+Contact:	SJ Park <[email protected]>
+Description:	Writing an integer to and reading from this file sets and gets
+		the start address of the report to manually generate and
+		submit, depending on the type of the report producer.  Note
+		that the start address is inclusive.
+
+What:		/sys/kernel/mm/damon/admin/reports/producers/<P>/addr_end
+Date:		Nov 2026
+Contact:	SJ Park <[email protected]>
+Description:	Writing an integer to and reading from this file sets and gets
+		the end address of the report to manually generate and submit,
+		depending on the type of the report producer.  Note that the
+		end address is exclusive.

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-copy-only-installed-probe-in-damon_split_region_at.patch mm-damon-core-add-damos_filter_type_age_ms.patch mm-damon-sysfs-schemes-support-damos_filter_type_age_ms.patch docs-mm-damon-design-update-for-age_ms-damos-core-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-age_ms-damos-core-filter.patch mm-damon-api-define-damon_filter_type_active.patch mm-damon-ops-common-implement-damon_filter_type_active-operation.patch mm-damon-sysfs-support-lru-activeness-based-damon-filter-setup.patch docs-mm-damon-design-update-for-damon_filter_type_active.patch maintainers-change-damon-scm-tree-to-mm-damongit.patch docs-mm-damon-maintainer-profile-use-damongit-for-patch-baselines.patch docs-mm-damon-maintainer-profile-drop-scm-trees-section.patch docs-mm-damon-maintainer-profile-update-key-cycle-dates-for-damongit.patch mm-damon-api-introduce-struct-damon_report.patch mm-damon-core-implement-data-attribute-report-queue.patch mm-damon-core-introduce-damon_submit_report.patch mm-damon-sysfs-add-admin-reports-directory.patch mm-damon-sysfs-add-reports-producers-directory.patch mm-damon-sysfs-add-producers-nr_producers-file.patch mm-damon-sysfs-implement-report-producer-directory.patch mm-damon-sysfs-implement-report-producer-type-and-state-files.patch docs-mm-damon-design-update-for-report-system.patch docs-admin-guide-mm-damon-usage-update-for-report-producer-sysfs.patch docs-abi-damon-update-for-report-producer-sysfs-files.patch mm-damon-core-introduce-damon_filter_type_report_made.patch mm-damon-core-introduce-damon_report_exist.patch mm-damon-paddr-support-report_made-type-probe-filter.patch mm-damon-sysfs-add-filter_report_type-file-under-probe-filter-directory.patch mm-damon-sysfs-support-report_made-type-probe-filter-setup.patch docs-mm-damon-design-update-for-report_made-probe-filter-type.patch docs-admin-guide-mm-damon-usage-update-for-report_made-probe-filter.patch docs-abi-damon-update-for-report_made-probe-filter.patch mm-damon-api-introduce-user_report-report-type.patch mm-damon-sysfs-add-user_report-support-for-report-type-input.patch mm-damon-sysfs-implement-report-producer-addr_startend-files.patch mm-damon-sysfs-implement-submit-command-for-report-producer.patch selftests-damon-sysfssh-add-basic-tests-for-admin-reports.patch docs-mm-damon-design-update-for-user-report-support.patch docs-admin-guide-mm-damon-usage-update-for-user_report-report-support.patch docs-abi-damon-update-for-user_report-report-support.patch