damon.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Hyeongtak Ji <hyeongtak.ji@gmail.com>
To: sj@kernel.org, akpm@linux-foundation.org
Cc: damon@lists.linux.dev, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	Hyeongtak Ji <hyeongtak.ji@gmail.com>,
	Hyeongtak Ji <hyeongtak.ji@sk.com>
Subject: [PATCH] mm/damon/core.c: avoid unintentional filtering out of schemes
Date: Fri, 10 Nov 2023 14:37:09 +0900	[thread overview]
Message-ID: <1699594629-3816-1-git-send-email-hyeongtak.ji@gmail.com> (raw)

The function '__damos_filter_out()' causes DAMON to always filter out
schemes whose filter type is anon or memcg if its matching value is set
to false.

This commit addresses the issue by ensuring that '__damos_filter_out()'
no longer applies to filters whose type is 'anon' or 'memcg'.

Signed-off-by: Hyeongtak Ji <hyeongtak.ji@sk.com>
---
 mm/damon/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/damon/core.c b/mm/damon/core.c
index bcd2bd9d6c10..d5ef8945a343 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -920,7 +920,7 @@ static bool __damos_filter_out(struct damon_ctx *ctx, struct damon_target *t,
 		matched = true;
 		break;
 	default:
-		break;
+		return false;
 	}
 
 	return matched == filter->matching;
-- 
2.7.4


             reply	other threads:[~2023-11-10  5:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-10  5:37 Hyeongtak Ji [this message]
2023-11-10 18:22 ` [PATCH] mm/damon/core.c: avoid unintentional filtering out of schemes SeongJae Park
2023-11-10 18:31   ` Andrew Morton
2023-11-11  0:34     ` Hyeongtak Ji
2023-11-10 18:31   ` SeongJae Park
  -- strict thread matches above, loose matches on Subject: below --
2023-11-30  6:37 honggyu.kim

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=1699594629-3816-1-git-send-email-hyeongtak.ji@gmail.com \
    --to=hyeongtak.ji@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=hyeongtak.ji@sk.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sj@kernel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).