Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: SJ Park <sj@kernel.org>
To: Sasha Levin <sashal@kernel.org>
Cc: SJ Park <sj@kernel.org>,
	stable@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 6.12.y 2/3] mm/damon: rename DAMON_MIN_REGION to DAMON_MIN_REGION_SZ
Date: Wed, 30 Sep 2026 02:24:48 -0700	[thread overview]
Message-ID: <20260930092449.43969-1-sj@kernel.org> (raw)
In-Reply-To: <20260930023401.3420697-2-sashal@kernel.org>

Hello Sasha,

On Tue, 29 Sep 2026 22:34:00 -0400 Sasha Levin <sashal@kernel.org> wrote:

> From: SeongJae Park <sj@kernel.org>
> 
> [ Upstream commit dfb1b0c9dc0d61e422905640e1e7334b3cf6f384 ]
> 
> The macro is for the default minimum size of each DAMON region.  There was
> a case that a reader was confused if it is the minimum number of total
> DAMON regions, which is set on damon_attrs->min_nr_regions.  Make the name
> more explicit.
> 
> Link: https://lkml.kernel.org/r/20260117175256.82826-8-sj@kernel.org
> Signed-off-by: SeongJae Park <sj@kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> 
> Stable backport preparation for b3723b596b548 ("mm/damon/core: fix
> unconditionally skip last region"):
> 
> Rename all uses present in 6.12, including the core KUnit override and
> tests.  Drop changes to address-unit/minimum-size context fields and the
> four-argument damon_set_regions() calls, which do not exist in this tree.
> 
> Match the target's quota helper preimage by passing the fixed region size
> as min_region_sz and incorporating the existing-function changes from
> 1745ccbd2907 ("mm/damon/core: do non-safe region walk on
> kdamond_apply_schemes()").  The region walk must visit newly split tails
> when the helper returns true for the already charged prefix.  Preserve
> the existing target-validity check and leave the last-region fix to the
> target commit.  No new functions or context fields are introduced.
> 
> [ sashal: Reduced backport -- upstream dfb1b0c9dc0d6 touches 7 file(s), this
>   backport carries 4. Not backported here:
>   mm/damon/lru_sort.c
>   mm/damon/reclaim.c
>   mm/damon/sysfs.c
>   mm/damon/tests/vaddr-kunit.h
>   This note is generated from the file lists only; see the resolution record
>   for the reasoning. ]
> 
> Stable-dep-of: b3723b596b54 ("mm/damon/core: fix unconditionally skip last region")
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
[...]
> @@ -1339,15 +1342,14 @@ static bool damos_skip_charged_region(struct damon_target *t,
>  		if (quota->charge_addr_from && r->ar.start <
>  				quota->charge_addr_from) {
>  			sz_to_skip = ALIGN_DOWN(quota->charge_addr_from -
> -					r->ar.start, DAMON_MIN_REGION);
> +					r->ar.start, min_region_sz);
>  			if (!sz_to_skip) {
> -				if (damon_sz_region(r) <= DAMON_MIN_REGION)
> +				if (damon_sz_region(r) <= min_region_sz)
>  					return true;
> -				sz_to_skip = DAMON_MIN_REGION;
> +				sz_to_skip = min_region_sz;
>  			}
>  			damon_split_region_at(t, r, sz_to_skip);
> -			r = damon_next_region(r);
> -			*rp = r;
> +			return true;

As I mentioned [1] on the backport of this patch for 6.18, this looks wrong to
me.  I will post a manual backport.  Could we drop this series and use the
manual backport instead?

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


Thanks,
SJ

[...]

  reply	other threads:[~2026-09-30  9:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29  8:27 FAILED: patch "[PATCH] mm/damon/core: fix unconditionally skip last region" failed to apply to 6.12-stable tree gregkh
2026-09-30  2:33 ` [PATCH 6.12.y 1/3] mm/damon/core: fix wasteful CPU calls by skipping non-existent targets Sasha Levin
2026-09-30  2:34   ` [PATCH 6.12.y 2/3] mm/damon: rename DAMON_MIN_REGION to DAMON_MIN_REGION_SZ Sasha Levin
2026-09-30  9:24     ` SJ Park [this message]
2026-09-30  9:31       ` SJ Park
2026-09-30  2:34   ` [PATCH 6.12.y 3/3] mm/damon/core: fix unconditionally skip last region Sasha Levin
2026-09-30 13:15     ` Greg KH
2026-09-30  9:28 ` [PATCH 6.12.y] " SJ Park
2026-09-30 10:03   ` SJ Park
2026-09-30 10:14 ` [PATCH 6.12.y v2] " SJ Park
2026-10-02 14:19   ` Sasha Levin
2026-10-09 12:36 ` [PATCH 6.12.y v3 0/2] mm/damon/core: fix last region handling of damos_skip_charged_regions() SJ Park
2026-10-09 12:36   ` [PATCH 6.12.y v3 1/2] mm/damon/core: do non-safe region walk on kdamond_apply_schemes() SJ Park
2026-10-09 12:36   ` [PATCH 6.12.y v3 2/2] mm/damon/core: fix unconditionally skip last region SJ Park
2026-10-11 16:48   ` [PATCH 6.12.y v3 0/2] mm/damon/core: fix last region handling of damos_skip_charged_regions() Sasha Levin

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=20260930092449.43969-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /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