[PATCH] samples/damon/mtier: add comment for struct region_range
Enze Li <[email protected]>
| Newsgroups | dev.linux.lists.damon,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> --- 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