[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250819062452.39889-1-sj@kernel.org>
Date: Mon, 18 Aug 2025 23:24:51 -0700
From: SeongJae Park <sj@...nel.org>
To: Quanmin Yan <yanquanmin1@...wei.com>
Cc: SeongJae Park <sj@...nel.org>,
akpm@...ux-foundation.org,
damon@...ts.linux.dev,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
wangkefeng.wang@...wei.com,
zuoze1@...wei.com
Subject: Re: [RFC PATCH -next 07/16] mm/damon/sysfs: implement addr_unit file under context dir
Hi Quanmin,
On Wed, 13 Aug 2025 13:06:57 +0800 Quanmin Yan <yanquanmin1@...wei.com> wrote:
> From: SeongJae Park <sj@...nel.org>
>
> Only DAMON kernel API callers can use addr_unit parameter. Implement a
> sysfs file to let DAMON sysfs ABI users use it.
As I suggested on another reply[1], please squash attaching patch to this one
when you post next version of this series.
[1] https://lore.kernel.org/20250813170224.6128-1-sj@kernel.org
[...]
Thanks,
SJ
==== Attachment 0 (0001-mm-damon-sysfs-return-EINVAL-for-zero-addr_unit.patch) ====
>From e0a5aa5e571ecd0f58b0914f8fc8562a60014ae8 Mon Sep 17 00:00:00 2001
From: SeongJae Park <sj@...nel.org>
Date: Wed, 13 Aug 2025 21:17:03 -0700
Subject: [PATCH] mm/damon/sysfs: return -EINVAL for zero addr_unit
Signed-off-by: SeongJae Park <sj@...nel.org>
---
mm/damon/sysfs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c
index bea782b0a711..eb4269383bae 100644
--- a/mm/damon/sysfs.c
+++ b/mm/damon/sysfs.c
@@ -1422,6 +1422,8 @@ static int damon_sysfs_apply_inputs(struct damon_ctx *ctx,
err = damon_select_ops(ctx, sys_ctx->ops_id);
if (err)
return err;
+ if (!sys_ctx->addr_unit)
+ return -EINVAL;
ctx->addr_unit = sys_ctx->addr_unit;
err = damon_sysfs_set_attrs(ctx, sys_ctx->attrs);
if (err)
--
2.39.5
Powered by blists - more mailing lists