Re: [PATCH v2] vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n

From: Matthew Wilcox
Date: Tue Nov 13 2018 - 08:04:28 EST


On Tue, Nov 13, 2018 at 04:04:36PM +0800, Wei Yang wrote:
> Commit fa5e084e43eb ("vmscan: do not unconditionally treat zones that
> fail zone_reclaim() as full") changed the return value of node_reclaim().
> The original return value 0 means NODE_RECLAIM_SOME after this commit.
>
> While the return value of node_reclaim() when CONFIG_NUMA is n is not
> changed. This will leads to call zone_watermark_ok() again.
>
> This patch fix the return value by adjusting to NODE_RECLAIM_NOSCAN. Since
> node_reclaim() is only called in page_alloc.c, move it to mm/internal.h.
>
> Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx>

Reviewed-by: Matthew Wilcox <willy@xxxxxxxxxxxxx>