mbox series

[6.1.y,0/7] Backport patches for DAMON merge regions fix

Message ID 20240716175205.51280-1-sj@kernel.org (mailing list archive)
Headers show
Series Backport patches for DAMON merge regions fix | expand

Message

SeongJae Park July 16, 2024, 5:51 p.m. UTC
Commit 310d6c15e910 ("mm/damon/core: merge regions aggressively when
max_nr_regions") causes a build warning [1] on 6.1.y.  That was due to
unnecessarily strict type check from max().

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 third one ("minmax: fix header
inclusions") are clean cherry-picks of upstream commit.  For the third
one, a minor conflict fix was needed.

[1] https://lore.kernel.org/2024071519-janitor-robe-779f@gregkh

Andy Shevchenko (1):
  minmax: fix header inclusions

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/minmax.h | 89 ++++++++++++++++++++++++++++++------------
 mm/damon/core.c        | 21 +++++++++-
 2 files changed, 83 insertions(+), 27 deletions(-)


base-commit: 291e563ecab1ea89c70172ecf0d6bff7b725d3cb

Comments

Greg KH July 16, 2024, 6:23 p.m. UTC | #1
On Tue, Jul 16, 2024 at 10:51:58AM -0700, SeongJae Park wrote:
> Commit 310d6c15e910 ("mm/damon/core: merge regions aggressively when
> max_nr_regions") causes a build warning [1] on 6.1.y.  That was due to
> unnecessarily strict type check from max().
> 
> 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 third one ("minmax: fix header
> inclusions") are clean cherry-picks of upstream commit.  For the third
> one, a minor conflict fix was needed.
> 
> [1] https://lore.kernel.org/2024071519-janitor-robe-779f@gregkh

Thanks for these, I'll queue them up after this round of -rc releases go
out in a few days.

greg k-h
Greg KH July 23, 2024, 12:10 p.m. UTC | #2
On Tue, Jul 16, 2024 at 08:23:46PM +0200, Greg KH wrote:
> On Tue, Jul 16, 2024 at 10:51:58AM -0700, SeongJae Park wrote:
> > Commit 310d6c15e910 ("mm/damon/core: merge regions aggressively when
> > max_nr_regions") causes a build warning [1] on 6.1.y.  That was due to
> > unnecessarily strict type check from max().
> > 
> > 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 third one ("minmax: fix header
> > inclusions") are clean cherry-picks of upstream commit.  For the third
> > one, a minor conflict fix was needed.
> > 
> > [1] https://lore.kernel.org/2024071519-janitor-robe-779f@gregkh
> 
> Thanks for these, I'll queue them up after this round of -rc releases go
> out in a few days.

All now queued up, MANY thanks for this, it fixed a different build
error that just got added to the 6.1 queue yesterday, as this problem
kept happening over and over due to backports breaking in different
ways.

greg k-h