linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: Quanmin Yan <yanquanmin1@huawei.com>
Cc: SeongJae Park <sj@kernel.org>,
	akpm@linux-foundation.org, damon@lists.linux.dev,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	wangkefeng.wang@huawei.com, zuoze1@huawei.com,
	kernel-team@meta.com, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v2 03/11] mm/damon/paddr: support addr_unit for DAMOS_PAGEOUT
Date: Tue, 26 Aug 2025 07:21:55 -0700	[thread overview]
Message-ID: <20250826142155.53632-1-sj@kernel.org> (raw)
In-Reply-To: <464f9f46-6ed5-4a78-8e06-878869f2afc4@huawei.com>

On Tue, 26 Aug 2025 12:51:17 +0800 Quanmin Yan <yanquanmin1@huawei.com> wrote:

> Hi SJ,
> 
> 在 2025/8/26 11:21, SeongJae Park 写道:
> > [...]
> >
> >>> ==== Attachment 0 (0001-mm-damon-paddr-use-do_div-on-i386-for-damon_pa_pageo.patch) ====
> >>>   From hackermail Thu Jan  1 00:00:00 1970
> >>> From: SeongJae Park <sj@kernel.org>
> >>> To: Andrew Morton <akpm@linux-foundation.org>
> >>> Cc: SeongJae Park <sj@kernel.org>
> >>> Cc: damon@lists.linux.dev
> >>> Cc: kernel-team@meta.com
> >>> Cc: linux-kernel@vger.kernel.org
> >>> Cc: linux-mm@kvack.org
> >>> Date: Mon, 25 Aug 2025 07:41:33 -0700
> >>> Subject: [PATCH 1/3] mm/damon/paddr: use do_div() on i386 for damon_pa_pageout()
> >>>            return value
> >>>
> >>> Otherwise, __udidi3 linking problem happens on certain configs.
> >>>
> >>> Reported-by: kernel test robot <lkp@intel.com>
> >>> Closes: https://lore.kernel.org/oe-kbuild-all/202508241831.EKwdwXZL-lkp@intel.com/
> >>> Signed-off-by: SeongJae Park <sj@kernel.org>
> >>> ---
> >>>    mm/damon/paddr.c | 14 +++++++++++++-
> >>>    1 file changed, 13 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c
> >>> index 5fad2f9a99a0..09c87583af6c 100644
> >>> --- a/mm/damon/paddr.c
> >>> +++ b/mm/damon/paddr.c
> >>> @@ -135,6 +135,18 @@ static bool damon_pa_invalid_damos_folio(struct folio *folio, struct damos *s)
> >>>    	return false;
> >>>    }
> >>>    
> >>> +/* convert physical address to core-layer address */
> >>> +static unsigned long damon_pa_core_addr(phys_addr_t pa,
> >>> +		unsigned long addr_unit)
> >>> +{
> >>> +#ifdef __i386__
> >> Can we use the following condition instead?
> >>
> >> #if !defined(CONFIG_64BIT) && defined(CONFIG_PHYS_ADDR_T_64BIT)
> > To my understanding, this issue happens only on i386, not every 32bit
> > architectures.  So I think i386 specific condition is better.
> 
> I understand. However, the aforementioned general condition is essential,
> and we should propose a new patch to address this. After introducing addr_unit,
> any 32-bit architecture should support monitoring of 64-bit phys_addr_t.

The issue is that we cannot divide 64bit values with plain '/' operator on
"i386", and hence this patch makes it to use do_div() instead of '/' on "i386".
No such or other problems at supporting 64-bit phys_addr_t is found on other
32bit architectures, to my understanding.  My understanding is that at least
you confirmed that on your arm-based test environment.  So we don't need a new
patch to my understanding.

Am I missing somthing?


Thanks,
SJ

[...]


  reply	other threads:[~2025-08-26 14:22 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-22  9:34 [PATCH v2 00/11] mm/damon: support ARM32 with LPAE Quanmin Yan
2025-08-22  9:34 ` [PATCH v2 01/11] mm/damon/core: add damon_ctx->addr_unit Quanmin Yan
2025-08-22  9:34 ` [PATCH v2 02/11] mm/damon/paddr: support addr_unit for access monitoring Quanmin Yan
2025-08-22  9:34 ` [PATCH v2 03/11] mm/damon/paddr: support addr_unit for DAMOS_PAGEOUT Quanmin Yan
2025-08-25 15:12   ` SeongJae Park
2025-08-26  3:16     ` Quanmin Yan
2025-08-26  3:21       ` SeongJae Park
2025-08-26  4:51         ` Quanmin Yan
2025-08-26 14:21           ` SeongJae Park [this message]
2025-08-27  2:21             ` Quanmin Yan
2025-08-27  2:42               ` SeongJae Park
2025-08-27  3:38                 ` Andrew Morton
2025-08-27 11:37                 ` Quanmin Yan
2025-08-27 18:07                   ` SeongJae Park
2025-08-28  1:38                     ` Quanmin Yan
2025-08-28  3:22                       ` SeongJae Park
2025-08-22  9:34 ` [PATCH v2 04/11] mm/damon/paddr: support addr_unit for DAMOS_LRU_[DE]PRIO Quanmin Yan
2025-08-25 15:13   ` SeongJae Park
2025-08-26  3:06     ` SeongJae Park
2025-08-22  9:34 ` [PATCH v2 05/11] mm/damon/paddr: support addr_unit for MIGRATE_{HOT,COLD} Quanmin Yan
2025-08-25 15:15   ` SeongJae Park
2025-08-22  9:34 ` [PATCH v2 06/11] mm/damon/paddr: support addr_unit for DAMOS_STAT Quanmin Yan
2025-08-22  9:34 ` [PATCH v2 07/11] mm/damon/sysfs: implement addr_unit file under context dir Quanmin Yan
2025-08-22  9:34 ` [PATCH v2 08/11] Docs/mm/damon/design: document 'address unit' parameter Quanmin Yan
2025-08-22  9:34 ` [PATCH v2 09/11] Docs/admin-guide/mm/damon/usage: document addr_unit file Quanmin Yan
2025-08-22  9:34 ` [PATCH v2 10/11] Docs/ABI/damon: " Quanmin Yan
2025-08-22  9:34 ` [PATCH v2 11/11] mm/damon: add damon_ctx->min_sz_region Quanmin Yan
2025-08-22 17:19   ` SeongJae Park
2025-08-22 17:21 ` [PATCH v2 00/11] mm/damon: support ARM32 with LPAE SeongJae Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250826142155.53632-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=yanquanmin1@huawei.com \
    --cc=zuoze1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox