[RFC PATCH v2 5/9] mm/damon/paddr: support only damos->ops_filters

SeongJae Park
2025-02-27T01:58:06Z

DAMON physical address space operation set implementation (paddr)
started handling both ->filters and ->ops_filters to avoid breakage
during the change for the ->ops_filters setup. Now the change is done,
so paddr's support of ->filters is a waste that can safely dropped.
Remove it.

Signed-off-by: SeongJae Park <sj@kernel.org>
---
mm/damon/paddr.c | 12 ------------
1 file changed, 12 deletions(-)

diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c
index 3e651308ba5d..432ea4efdc4b 100644
--- a/mm/damon/paddr.c
+++ b/mm/damon/paddr.c
@@ -253,10 +253,6 @@ static bool damos_pa_filter_out(struct damos *scheme, struct folio *folio)
{
struct damos_filter *filter;

- damos_for_each_filter(filter, scheme) {
- if (damos_pa_filter_match(filter, folio))
- return !filter->allow;
- }
damos_for_each_ops_filter(filter, scheme) {
if (damos_pa_filter_match(filter, folio))
return !filter->allow;
@@ -285,12 +281,6 @@ static unsigned long damon_pa_pageout(struct damon_region *r, struct damos *s,
struct folio *folio;

/* check access in page level again by default */
- damos_for_each_filter(filter, s) {
- if (filter->type == DAMOS_FILTER_TYPE_YOUNG) {
- install_young_filter = false;
- break;
- }
- }
damos_for_each_ops_filter(filter, s) {
if (filter->type == DAMOS_FILTER_TYPE_YOUNG) {
install_young_filter = false;
@@ -543,8 +533,6 @@ static bool damon_pa_scheme_has_filter(struct damos *s)
{
struct damos_filter *f;

- damos_for_each_filter(f, s)
- return true;
damos_for_each_ops_filter(f, s)
return true;
return false;
--
2.39.5