Re: [RFC PATCH v3 25/37] Docs/admin-guide/mm/damon/usage: document sample filters dir

From: SJ Park

Date: Fri Aug 28 2026 - 14:34:36 EST


On Fri, 28 Aug 2026 12:13:20 +0800 Zenghui Yu <zenghui.yu@xxxxxxxxx> wrote:

> On 12/8/25 2:29 PM, SeongJae Park wrote:
> > Update DAMON usage document for the added DAMON sysfs files for
> > installing and setting the access sample results filtering.
> >
> > Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>
> > ---
> > Documentation/admin-guide/mm/damon/usage.rst | 25 +++++++++++++++++++-
> > 1 file changed, 24 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst
> > index 897a89950351..365a4548a5ba 100644
> > --- a/Documentation/admin-guide/mm/damon/usage.rst
> > +++ b/Documentation/admin-guide/mm/damon/usage.rst
> > @@ -66,6 +66,8 @@ comma (",").
> > │ │ │ │ │ │ intervals/sample_us,aggr_us,update_us
> > │ │ │ │ │ │ │ intervals_goal/access_bp,aggrs,min_sample_us,max_sample_us
> > │ │ │ │ │ │ sample/primitives/page_table,page_faults
> > + │ │ │ │ │ │ sample/filters/nr_filters
> > + │ │ │ │ │ │ │ 0/type,matching,allow,cpumask
> > │ │ │ │ │ │ nr_regions/min,max
> > │ │ │ │ │ :ref:`targets <sysfs_targets>`/nr_targets
> > │ │ │ │ │ │ :ref:`0 <sysfs_target>`/pid_target,obsolete_target
> > @@ -233,7 +235,8 @@ writing to and rading from the files.
> > For more details about the intervals and monitoring regions range, please refer
> > to the Design document (:doc:`/mm/damon/design`).
> >
> > -Under ``sample`` directory, a directory, ``primitives`` exists.
> > +Under ``sample`` directory, two directories, ``primitives`` and ``filters``
> > +exist.
> >
> > contexts/<N>/monitoring_attrs/sample/primitives/
> > ------------------------------------------------
> > @@ -245,6 +248,26 @@ to these files, users can select whether to use the :ref:`page table accessed
> > bit <damon_design_pte_accessed_bit_access_check>` and :ref:`page fault events
> > <damon_design_page_fault_access_check>`, respectively.
> >
> > +contexts/<N>/monitoring_attrs/sample/filters/
> > +---------------------------------------------
> > +
> > +This directory is for control of the :ref:`access sampling results filters
> > +<damon_design_sampling_results_filters>`. At the beginning, this directory has
> > +only one file, ``nr_filters``. Writing a positive integer ``<n>`` to the file
> > +generates directories of the number, named ``0`` to ``<n - 1>``. The generated
> > +directories represent the sampling result filters to install to the DAMON
> > +context, in the order of the directory names. Writing ``0`` to ``nr_filters``
> > +removes the directories.
> > +
> > +Under the individual filter directory, five files, ``type``, ``matching``,
>
> nitpick: "four files" in this patch and "five files" in patch #32.

Thank you for reviewing, Zenghui! I will keep this in my mind when I write a
successor [1] of this.

[1] https://lore.kernel.org/all/20260525225208.1179-1-sj@xxxxxxxxxx/


Thanks,
SJ

[...]