All of 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

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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.