Skip to content

Backport patches for DAMON merge regions fix

SeongJae Park damon linux-mm linux-sparse lkml stable 1 version Applied

Status from this message: This is a note to let you know that I've just added the patch titled

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/8tracing: Define the is_signed_type() macro onceinclude/linux/compiler.h include/linux/overflow.h include/linux/trace_events.h+6 -30 replies
2/8minmax: sanity check constant bounds when clampinginclude/linux/minmax.h+24 -20 replies
3/8minmax: clamp more efficiently by avoiding extra comparisoninclude/linux/minmax.h+1 -10 replies
4/8minmax: fix header inclusionsinclude/linux/minmax.h+2 -00 replies
5/8minmax: allow min()/max()/clamp() if the arguments have the same signedness.include/linux/minmax.h+32 -280 replies
6/8minmax: allow comparisons of 'int' against 'unsigned char/short'include/linux/minmax.h+3 -20 replies
7/8minmax: relax check to allow comparison between unsigned arguments and signed constantsinclude/linux/minmax.h+17 -70 replies
8/8mm/damon/core: merge regions aggressively when max_nr_regions is unmetmm/damon/core.c+20 -31 reply

Reviews trailers per patch

3 of 8 patches have a Reviewed-by or Acked-by.

PatchKees CookAndy ShevchenkoHerve Codina
1/8A-b
2/8R-b
3/8
4/8R-b
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 5.15.y 0/8] Backport patches for DAMON merge regions fix

Commit 310d6c15e910 ("mm/damon/core: merge regions aggressively when max_nr_regions") causes a build warning and a build failure [1] on 5.15.y. Those are due to
1) unnecessarily strict type check from max(), and
2) use of not-yet-introduced damon_ctx->attrs field, respectively.

Fix the warning by backporting a minmax.h upstream commit that made the type check less strict for unnecessary case, and upstream commits that it depends on.

Note that all patches except the fourth one ("minmax: fix header inclusions") are clean cherry-picks of upstream commit. For the fourth one, minor conflict resolving was needed.

Also, the last patch, which is the backport of the DAMON fix, was cleanly cherry-picked, but added manual fix for the build failure.

[1] https://lore.kernel.org/2024071532-pebble-jailhouse-48b2@gregkh

Andy Shevchenko (1):
minmax: fix header inclusions

Bart Van Assche (1):
tracing: Define the is_signed_type() macro once

David Laight (3):
minmax: allow min()/max()/clamp() if the arguments have the same
signedness.
minmax: allow comparisons of 'int' against 'unsigned char/short'
minmax: relax check to allow comparison between unsigned arguments and
signed constants

Jason A. Donenfeld (2):
minmax: sanity check constant bounds when clamping
minmax: clamp more efficiently by avoiding extra comparison

SeongJae Park (1):
mm/damon/core: merge regions aggressively when max_nr_regions is unmet

 include/linux/compiler.h     |  6 +++
 include/linux/minmax.h       | 89 ++++++++++++++++++++++++++----------
 include/linux/overflow.h     |  1 -
 include/linux/trace_events.h |  2 -
 mm/damon/core.c              | 23 ++++++++--
 5 files changed, 90 insertions(+), 31 deletions(-)

base-commit: 4d1b7f1bf3858ed48a98c004bda5fdff2cdf13c8

Signature · 1 line
2.39.2