Re: [PATCH] mm: remove redundant __GFP_NOWARN

From: SeongJae Park
Date: Tue Aug 12 2025 - 13:11:32 EST


On Tue, 12 Aug 2025 22:11:16 +0900 Harry Yoo <harry.yoo@xxxxxxxxxx> wrote:

> On Tue, Aug 12, 2025 at 05:57:46PM +0800, Qianfeng Rong wrote:
> > Commit 16f5dfbc851b ("gfp: include __GFP_NOWARN in GFP_NOWAIT") made
> > GFP_NOWAIT implicitly include __GFP_NOWARN.
> >
> > Therefore, explicit __GFP_NOWARN combined with GFP_NOWAIT (e.g.,
> > `GFP_NOWAIT | __GFP_NOWARN`) is now redundant. Let's clean up these
> > redundant flags across subsystems.
> >
> > No functional changes.
> >
> > Signed-off-by: Qianfeng Rong <rongqianfeng@xxxxxxxx>
> > ---
>
> Maybe
>
> .gfp_mask = (GFP_HIGHUSER_MOVABLE & ~__GFP_RECLAIM) |
> __GFP_NOWARN | __GFP_NOMEMALLOC | GFP_NOWAIT,
>
> in mm/damon/paddr.c also can be cleaned up to
>
> .gfp_mask = (GFP_HIGHUSER_MOVABLE & ~__GFP_RECLAIM) |
> | __GFP_NOMEMALLOC | GFP_NOWAIT,
>
> ?

Thank you for catching this, Harry!

FYI, the code has moved into mm/damon/ops-common.c by commit 13dde31db71f
("mm/damon: move migration helpers from paddr to ops-common"). Please feel
free to make the cleanup if anyone willing to.


Thanks,
SJ

[...]