* [PATCH] mm/damon/core.c: avoid unintentional filtering out of schemes
@ 2023-11-10 5:37 Hyeongtak Ji
2023-11-10 18:22 ` SeongJae Park
0 siblings, 1 reply; 5+ messages in thread
From: Hyeongtak Ji @ 2023-11-10 5:37 UTC (permalink / raw)
To: sj, akpm; +Cc: damon, linux-mm, linux-kernel, Hyeongtak Ji, Hyeongtak Ji
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm/damon/core.c: avoid unintentional filtering out of schemes
2023-11-10 5:37 [PATCH] mm/damon/core.c: avoid unintentional filtering out of schemes Hyeongtak Ji
@ 2023-11-10 18:22 ` SeongJae Park
2023-11-10 18:31 ` Andrew Morton
2023-11-10 18:31 ` SeongJae Park
0 siblings, 2 replies; 5+ messages in thread
From: SeongJae Park @ 2023-11-10 18:22 UTC (permalink / raw)
To: Hyeongtak Ji; +Cc: sj, akpm, damon, linux-mm, linux-kernel, Hyeongtak Ji
Hello Hyueongtak,
On Fri, 10 Nov 2023 14:37:09 +0900 Hyeongtak Ji <hyeongtak.ji@gmail.com> wrote:
> 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'.
Nice catch, thank you!
checkpatch.pl shows one warning, though:
WARNING: From:/Signed-off-by: email address mismatch: 'From: Hyeongtak Ji <hyeongtak.ji@gmail.com>' != 'Signed-off-by: Hyeongtak Ji <hyeongtak.ji@sk.com>'
>
> Signed-off-by: Hyeongtak Ji <hyeongtak.ji@sk.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Thanks,
SJ
> ---
> 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
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm/damon/core.c: avoid unintentional filtering out of schemes
2023-11-10 18:22 ` SeongJae Park
@ 2023-11-10 18:31 ` Andrew Morton
2023-11-11 0:34 ` Hyeongtak Ji
2023-11-10 18:31 ` SeongJae Park
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2023-11-10 18:31 UTC (permalink / raw)
To: SeongJae Park; +Cc: Hyeongtak Ji, damon, linux-mm, linux-kernel, Hyeongtak Ji
On Fri, 10 Nov 2023 18:22:40 +0000 SeongJae Park <sj@kernel.org> wrote:
> Hello Hyueongtak,
>
> On Fri, 10 Nov 2023 14:37:09 +0900 Hyeongtak Ji <hyeongtak.ji@gmail.com> wrote:
>
> > 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'.
>
> Nice catch, thank you!
>
> checkpatch.pl shows one warning, though:
>
> WARNING: From:/Signed-off-by: email address mismatch: 'From: Hyeongtak Ji <hyeongtak.ji@gmail.com>' != 'Signed-off-by: Hyeongtak Ji <hyeongtak.ji@sk.com>'
This can be addressed by including an explicit From: line at start of
changelog. Which should we use?
> >
> > Signed-off-by: Hyeongtak Ji <hyeongtak.ji@sk.com>
>
> Reviewed-by: SeongJae Park <sj@kernel.org>
I'll add
Fixes: ab9bda001b681 ("mm/damon/core: introduce address range type damos filter")
Cc: <stable@vger.kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm/damon/core.c: avoid unintentional filtering out of schemes
2023-11-10 18:22 ` SeongJae Park
2023-11-10 18:31 ` Andrew Morton
@ 2023-11-10 18:31 ` SeongJae Park
1 sibling, 0 replies; 5+ messages in thread
From: SeongJae Park @ 2023-11-10 18:31 UTC (permalink / raw)
To: SeongJae Park
Cc: Hyeongtak Ji, akpm, damon, linux-mm, linux-kernel, Hyeongtak Ji, stable
On Fri, 10 Nov 2023 18:22:40 +0000 SeongJae Park <sj@kernel.org> wrote:
> Hello Hyueongtak,
>
> On Fri, 10 Nov 2023 14:37:09 +0900 Hyeongtak Ji <hyeongtak.ji@gmail.com> wrote:
>
> > 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'.
>
> Nice catch, thank you!
>
> checkpatch.pl shows one warning, though:
>
> WARNING: From:/Signed-off-by: email address mismatch: 'From: Hyeongtak Ji <hyeongtak.ji@gmail.com>' != 'Signed-off-by: Hyeongtak Ji <hyeongtak.ji@sk.com>'
>
Also, I think we need to add below?
Fixes: ab9bda001b68 ("mm/damon/core: introduce address range type damos filter")
Cc: <stable@vger.kernel.org> # 6.6.y
> >
> > Signed-off-by: Hyeongtak Ji <hyeongtak.ji@sk.com>
>
> Reviewed-by: SeongJae Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm/damon/core.c: avoid unintentional filtering out of schemes
2023-11-10 18:31 ` Andrew Morton
@ 2023-11-11 0:34 ` Hyeongtak Ji
0 siblings, 0 replies; 5+ messages in thread
From: Hyeongtak Ji @ 2023-11-11 0:34 UTC (permalink / raw)
To: Andrew Morton; +Cc: SeongJae Park, damon, linux-mm, linux-kernel, Hyeongtak Ji
On Sat, Nov 11, 2023 at 3:31 AM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Fri, 10 Nov 2023 18:22:40 +0000 SeongJae Park <sj@kernel.org> wrote:
>
> > Hello Hyueongtak,
> >
> > On Fri, 10 Nov 2023 14:37:09 +0900 Hyeongtak Ji <hyeongtak.ji@gmail.com> wrote:
> >
> > > 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'.
> >
> > Nice catch, thank you!
> >
> > checkpatch.pl shows one warning, though:
> >
> > WARNING: From:/Signed-off-by: email address mismatch: 'From: Hyeongtak Ji <hyeongtak.ji@gmail.com>' != 'Signed-off-by: Hyeongtak Ji <hyeongtak.ji@sk.com>'
>
> This can be addressed by including an explicit From: line at start of
> changelog. Which should we use?
Please use <hyeongtak.ji@sk.com> if it's possible.
>
> > >
> > > Signed-off-by: Hyeongtak Ji <hyeongtak.ji@sk.com>
> >
> > Reviewed-by: SeongJae Park <sj@kernel.org>
>
> I'll add
>
> Fixes: ab9bda001b681 ("mm/damon/core: introduce address range type damos filter")
> Cc: <stable@vger.kernel.org>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-11-11 0:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-10 5:37 [PATCH] mm/damon/core.c: avoid unintentional filtering out of schemes Hyeongtak Ji
2023-11-10 18:22 ` SeongJae Park
2023-11-10 18:31 ` Andrew Morton
2023-11-11 0:34 ` Hyeongtak Ji
2023-11-10 18:31 ` SeongJae Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox