From: SeongJae Park <sj@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: SeongJae Park <sj@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
damon@lists.linux.dev, kernel-team@meta.com,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: [PATCH 0/8] mm/damon: add sysfs dirs for managing DAMOS filters based on handling layers
Date: Wed, 5 Mar 2025 14:27:25 -0800 [thread overview]
Message-ID: <20250305222733.59089-1-sj@kernel.org> (raw)
DAMOS filters are categorized into two groups based on their handling
layers, namely core and operations layers. The categorization affects
when each filter is evaluated. Core layer handled filters are evaluated
first. The order meant nothing before, but introduction of allow
filters changed that.
DAMOS sysfs interface provides single directory for filters, namely
'filters'. Users can install any filters in any order there. DAMON
will internally categorize those into core and operations layer handled
ones, and apply the evaluation order rule. The ordering rule is clearly
documented. But the interface could still confuse users since it is
allowed to install filters on the directory in mixed ways.
Add two sysfs directories for managing filters by handling layers,
namely 'core_filters' and 'ops_filters' for filters that handled by core
and operations layer, respectively. Those are avoided to be used for
installing filters that not handled by the assumed layers.
For backward compatibility, keep 'filters' directory with its curernt
behavior. Filters installed in the directory will be added to DAMON
after those of 'core_filters' and 'ops_filters' directories, with the
automatic categorizations. Also recommend users to use the new
directories while noticing 'filters' directory could be deprecated in
future on the usage documents.
Note that new directories provide all features that were provided with
'filters', but just in a more clear way. Deprecating 'filters' in
future will hence not make an irreversal feature loss.
Changes from RFC
(https://lore.kernel.org/20250220194646.37726-1-sj@kernel.org)
- Fix sphinx error on usage doc change
- Wrodsmith commit messages
- Rebase on latest mm-unstable
SeongJae Park (8):
mm/damon/sysfs-schemes: let damon_sysfs_scheme_set_filters() be used
for different named directories
mm/damon/sysfs-schemes: implement core_filters and ops_filters
directories
mm/damon/sysfs-schemes: commit filters in {core,ops}_filters
directories
mm/damon/core: expose damos_filter_for_ops() to DAMON kernel API
callers
mm/damon/sysfs-schemes: record filters of which layer should be added
to the given filters directory
mm/damon/sysfs-schemes: return error when for attempts to install
filters on wrong sysfs directory
Docs/ABI/damon: document {core,ops}_filters directories
Docs/admin-guide/mm/damon/usage: update for {core,ops}_filters
directories
.../ABI/testing/sysfs-kernel-mm-damon | 16 +++
Documentation/admin-guide/mm/damon/usage.rst | 31 +++--
include/linux/damon.h | 1 +
mm/damon/core.c | 9 +-
mm/damon/sysfs-schemes.c | 119 ++++++++++++++++--
5 files changed, 153 insertions(+), 23 deletions(-)
base-commit: d5ce0f2fd108557fb138adccb203441d0d70f1c4
--
2.39.5
next reply other threads:[~2025-03-05 22:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 22:27 SeongJae Park [this message]
2025-03-05 22:27 ` [PATCH 1/8] mm/damon/sysfs-schemes: let damon_sysfs_scheme_set_filters() be used for different named directories SeongJae Park
2025-03-05 22:27 ` [PATCH 2/8] mm/damon/sysfs-schemes: implement core_filters and ops_filters directories SeongJae Park
2025-03-05 22:27 ` [PATCH 3/8] mm/damon/sysfs-schemes: commit filters in {core,ops}_filters directories SeongJae Park
2025-03-05 22:27 ` [PATCH 4/8] mm/damon/core: expose damos_filter_for_ops() to DAMON kernel API callers SeongJae Park
2025-03-05 22:27 ` [PATCH 5/8] mm/damon/sysfs-schemes: record filters of which layer should be added to the given filters directory SeongJae Park
2025-03-05 22:27 ` [PATCH 6/8] mm/damon/sysfs-schemes: return error when for attempts to install filters on wrong sysfs directory SeongJae Park
2025-03-05 22:27 ` [PATCH 7/8] Docs/ABI/damon: document {core,ops}_filters directories SeongJae Park
2025-03-05 22:27 ` [PATCH 8/8] Docs/admin-guide/mm/damon/usage: update for " SeongJae Park
-- strict thread matches above, loose matches on Subject: below --
2025-02-20 19:46 [PATCH 0/8] mm/damon: add sysfs dirs for managing DAMOS filters based on handling layers SeongJae Park
2025-02-20 22:14 ` SeongJae Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250305222733.59089-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=damon@lists.linux.dev \
--cc=kernel-team@meta.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox