All of lore.kernel.org
 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
Subject: Re: [PATCH 11/11] mm/damon: add damon_ctx->min_region
Date: Fri, 22 Aug 2025 11:03:22 -0700	[thread overview]
Message-ID: <20250822180322.47842-1-sj@kernel.org> (raw)
In-Reply-To: <8b3f1571-6510-453f-96d4-f365eb10d02d@huawei.com>

On Fri, 22 Aug 2025 09:29:04 +0800 Quanmin Yan <yanquanmin1@huawei.com> wrote:

> 
> 在 2025/8/22 1:33, SeongJae Park 写道:
> > On Thu, 21 Aug 2025 18:51:59 +0800 Quanmin Yan <yanquanmin1@huawei.com> wrote:
> >
> >> Adopting addr_unit would make DAMON_MINREGION 'addr_unit * 4096'
> >> bytes and cause data alignment issues[1].
> >>
> >> Add damon_ctx->min_region to change DAMON_MIN_REGION from a global
> > s/min_region/min_sz_region/ ?
> >
> >> macro value to per-context variable.
> >>
> >> [1] https://lore.kernel.org/all/527714dd-0e33-43ab-bbbd-d89670ba79e7@huawei.com
> >>
> >> Signed-off-by: Quanmin Yan <yanquanmin1@huawei.com>
> >> ---
> >>   include/linux/damon.h        |  4 ++-
> >>   mm/damon/core.c              | 67 ++++++++++++++++++++----------------
> >>   mm/damon/sysfs.c             |  8 +++--
> >>   mm/damon/tests/core-kunit.h  | 21 ++++++-----
> >>   mm/damon/tests/vaddr-kunit.h |  2 +-
> >>   mm/damon/vaddr.c             |  2 +-
> >>   6 files changed, 61 insertions(+), 43 deletions(-)
> > [...]
> >> @@ -1248,6 +1253,7 @@ int damon_commit_ctx(struct damon_ctx *dst, struct damon_ctx *src)
> >>   	}
> >>   	dst->ops = src->ops;
> >>   	dst->addr_unit = src->addr_unit;
> >> +	dst->min_sz_region = max(DAMON_MIN_REGION / src->addr_unit, 1);
> > Can't we set this as src->min_sz_region?
> >
> > I asked a same question[1] to the previous version but seems it was missed.
> 
> I apologize for the issues caused by my misunderstanding and carelessness.
> I will make adjustments and release the v2 version as soon as possible, and I
> will not make similar mistakes again in the future.

No worry, we all miss someething sometimes ;) I confirmed your change on v2.
Thank you for correctly making the change.


Thanks,
SJ

[...]

      reply	other threads:[~2025-08-22 18:03 UTC|newest]

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

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=20250822180322.47842-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --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 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.