public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: SeongJae Park <sj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	damon@lists.linux.dev, kernel-team@meta.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RFC PATCH v2 7/9] mm/damon/core: set damos_filter default allowance behavior based on installed filters
Date: Thu, 27 Feb 2025 20:48:45 -0800	[thread overview]
Message-ID: <20250228044845.37918-1-sj@kernel.org> (raw)
In-Reply-To: <20250227055054.22813-1-sj@kernel.org>

On Wed, 26 Feb 2025 21:50:54 -0800 SeongJae Park <sj@kernel.org> wrote:

> On Wed, 26 Feb 2025 17:57:52 -0800 SeongJae Park <sj@kernel.org> wrote:
> 
> > Decide whether to allow or reject by default on core and opertions layer
> > handled filters evaluation stages.  It is decided as the opposite of the
> > last installed filter's behavior.  If there is no filter at all, allow
> > by default.  If there is any operations layer handled filters, core
> > layer's filtering stage sets allowing as the default behavior regardless
> > of the last filter of core layer-handling ones, since the last filter of
> > core layer handled filters in the case is not really the last filter of
> > the entire filtering stage.
> 
> This is not sufficient enough.  Even with this change, core-handled allow
> filters after core-handled reject filters are still meaningless.
> 
> If a region is matched to a core layer handled filter, the allow/reject
> decision should be respected while ignoring all remaining filters, regardless
> of on what layer those are handled.  It works in the way for reect filters,
> since core layer-rejected regions are not passed to the ops layer at all.  In
> case of allow filter, however, the region is passed to ops layer without the
> information about whether it has passed to the ops layer because it was
> allowed, or just not matched to any filter.  Hence, all ops filters can be
> applied to the region.
> 
> We can implement this missing part by storing the core layer filtering stage
> decision somewhere and let ops filter filtering stage repsect it.  Changes like
> attached diff at the end of this mail may work.  I will add such changes to
> next version of this patch series.

I now realize this is not a missing part of this improvement patch series, but
a sole fix for the allow filter behavior.  The current behavior is not matching
with the documented one, and this change will fix it.  I will post a patch for
this fix separately from this patch series.


Thanks,
SJ

[...]

  reply	other threads:[~2025-02-28  4:48 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 ` [RFC PATCH v2 6/9] mm/damon: add default allow/reject behavior fields to struct damos SeongJae Park
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 [this message]
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=20250228044845.37918-1-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