Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] samples/damon/mtier: add comment for struct region_range
@ 2026-07-21  7:07 Enze Li
  2026-07-21 14:06 ` SJ Park
  0 siblings, 1 reply; 3+ messages in thread
From: Enze Li @ 2026-07-21  7:07 UTC (permalink / raw)
  To: sj; +Cc: damon, linux-mm, lienze, enze.li

The mtier sample defines a local struct region_range using phys_addr_t
instead of damon_addr_range which uses unsigned long.  Add a comment
explaining the rationale: on 32-bit systems with more than 4GiB memory,
phys_addr_t will be 64-bit while unsigned long is 32-bit.

Signed-off-by: Enze Li <lienze@kylinos.cn>
---
 samples/damon/mtier.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/samples/damon/mtier.c b/samples/damon/mtier.c
index ac9c24b92ead..27dc88bdf7a0 100644
--- a/samples/damon/mtier.c
+++ b/samples/damon/mtier.c
@@ -52,6 +52,11 @@ module_param(detect_node_addresses, bool, 0600);
 
 static struct damon_ctx *ctxs[2];
 
+/*
+ * Use phys_addr_t instead of damon_addr_range (unsigned long) for physical
+ * addresses.  On 32-bit systems with more than 4GB memory, phys_addr_t will
+ * be 64-bit while unsigned long is 32-bit.
+ */
 struct region_range {
 	phys_addr_t start;
 	phys_addr_t end;

base-commit: 3d18f3499c48ee94a49589500ce94e41c5acdf4b
-- 
2.55.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] samples/damon/mtier: add comment for struct region_range
  2026-07-21  7:07 [PATCH] samples/damon/mtier: add comment for struct region_range Enze Li
@ 2026-07-21 14:06 ` SJ Park
  2026-07-22 13:46   ` SJ Park
  0 siblings, 1 reply; 3+ messages in thread
From: SJ Park @ 2026-07-21 14:06 UTC (permalink / raw)
  To: Enze Li; +Cc: SJ Park, damon, linux-mm, enze.li

On Tue, 21 Jul 2026 15:07:56 +0800 Enze Li <lienze@kylinos.cn> wrote:

> The mtier sample defines a local struct region_range using phys_addr_t
> instead of damon_addr_range which uses unsigned long.  Add a comment
> explaining the rationale: on 32-bit systems with more than 4GiB memory,
> phys_addr_t will be 64-bit while unsigned long is 32-bit.

Looks good to me.

> 
> Signed-off-by: Enze Li <lienze@kylinos.cn>

Reviewed-by: SJ Park <sj@kernel.org>

This patch is applied to damon/next [1] tree.  If this patch is not added to
mm.git in short term (~3 days?), I will ask mm.git maintainer (Andrew Morton)
to pick this.  So, no action from your side is needed for now.  If it seems I
also forgot doing that or you cannot wait for my action, please feel free to
directly ask that to Andrew.

[1] https://origin.kernel.org/doc/html/latest/mm/damon/maintainer-profile.html#scm-trees


Thanks,
SJ

[...]


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] samples/damon/mtier: add comment for struct region_range
  2026-07-21 14:06 ` SJ Park
@ 2026-07-22 13:46   ` SJ Park
  0 siblings, 0 replies; 3+ messages in thread
From: SJ Park @ 2026-07-22 13:46 UTC (permalink / raw)
  To: SJ Park; +Cc: Enze Li, damon, linux-mm, enze.li

On Tue, 21 Jul 2026 07:06:18 -0700 SJ Park <sj@kernel.org> wrote:

> On Tue, 21 Jul 2026 15:07:56 +0800 Enze Li <lienze@kylinos.cn> wrote:
[...]
> This patch is applied to damon/next [1] tree.  If this patch is not added to
> mm.git in short term (~3 days?), I will ask mm.git maintainer (Andrew Morton)
> to pick this.  So, no action from your side is needed for now.  If it seems I
> also forgot doing that or you cannot wait for my action, please feel free to
> directly ask that to Andrew.
> 
> [1] https://origin.kernel.org/doc/html/latest/mm/damon/maintainer-profile.html#scm-trees


We (mm community) now want to focus on making mm.git more stabilized and
therefore ready for the next merge window, rather than adding more changes that
are not really urgent.  I agree and want to help [1] that.  For the reason,
unless Andre pick this first, I will request adding this to mm.git only after
next -rc1 release.  Let me know if you think this is really urgent.

[1] https://lore.kernel.org/20260722133829.87607-1-sj@kernel.org


Thanks,
SJ

[...]


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-22 13:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-21  7:07 [PATCH] samples/damon/mtier: add comment for struct region_range Enze Li
2026-07-21 14:06 ` SJ Park
2026-07-22 13:46   ` SJ Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox