From: SeongJae Park <sj@kernel.org>
Cc: SeongJae Park <sj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
damon@lists.linux.dev, kernel-team@meta.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [RFC PATCH v2 6/9] mm/damon: add default allow/reject behavior fields to struct damos
Date: Wed, 26 Feb 2025 17:57:51 -0800 [thread overview]
Message-ID: <20250227015754.38789-7-sj@kernel.org> (raw)
In-Reply-To: <20250227015754.38789-1-sj@kernel.org>
Current default allow/reject behavior of filters handling stage has made
before introduction of the allow behavior. For allow-filters usage, it
is confusing and inefficient.
It is more intuitive to decide the default filtering stage allow/reject
behavior as opposite to the last filter's behavior. The decision should
be made separately for core and operations layers' filtering stages,
since last core layer-handled filter is not really a last filter if
there are operations layer handling filters.
Keeping separate decisions for the two categories can make the logic
simpler. Add fields for storing the two decisions.
Signed-off-by: SeongJae Park <sj@kernel.org>
---
include/linux/damon.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/damon.h b/include/linux/damon.h
index add82fdc1117..1d8479f57f85 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -497,6 +497,9 @@ struct damos {
unsigned long next_apply_sis;
/* informs if ongoing DAMOS walk for this scheme is finished */
bool walk_completed;
+ /* whether to reject core/ops filters umatched regions */
+ bool core_filters_default_reject;
+ bool ops_filters_default_reject;
/* public: */
struct damos_quota quota;
struct damos_watermarks wmarks;
--
2.39.5
next prev parent reply other threads:[~2025-02-27 1:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-27 1:57 [RFC PATCH v2 0/9] mm/damon: make allow filters after reject filters useful and intuitive SeongJae Park
2025-02-27 1:57 ` [RFC PATCH v2 1/9] mm/damon/core: introduce damos->ops_filters SeongJae Park
2025-02-27 1:57 ` [RFC PATCH v2 2/9] mm/damon/paddr: support ops_filters SeongJae Park
2025-02-27 1:57 ` [RFC PATCH v2 3/9] mm/damon/core: support committing ops_filters SeongJae Park
2025-02-27 1:57 ` [RFC PATCH v2 4/9] mm/damon/core: put ops-handled filters to damos->ops_filters SeongJae Park
2025-02-27 1:57 ` [RFC PATCH v2 5/9] mm/damon/paddr: support only damos->ops_filters SeongJae Park
2025-02-27 1:57 ` SeongJae Park [this message]
2025-02-27 1:57 ` [RFC PATCH v2 7/9] mm/damon/core: set damos_filter default allowance behavior based on installed filters SeongJae Park
2025-02-27 5:50 ` SeongJae Park
2025-02-28 4:48 ` SeongJae Park
2025-02-27 1:57 ` [RFC PATCH v2 8/9] mm/damon/paddr: respect ops_filters_default_reject SeongJae Park
2025-02-27 1:57 ` [RFC PATCH v2 9/9] Docs/mm/damon/design: update for changed filter-default behavior 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=20250227015754.38789-7-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=kernel-team@meta.com \
--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