Re: [PATCH v3 1/1] mm: let node_reclaim() return the number of pages reclaimed

From: Andrew Morton

Date: Fri Jul 10 2026 - 19:27:38 EST


On Fri, 10 Jul 2026 17:23:20 +0200 Petr Tesarik <ptesarik@xxxxxxxx> wrote:

> There is only one caller, get_page_from_freelist(), and it does not make
> any use of the reason for skipping the reclaim, nor does it make any
> distinction between a full and partially successful reclaim.
>
> Therefore, node_reclaim() can simply return the number of pages that have
> been reclaimed, same as __node_reclaim(), and the NODE_RECLAIM_xxx macros
> can be removed.

AI review
(https://sashiko.dev/#/patchset/20260710152320.2024283-1-ptesarik@xxxxxxxx)
points out that the macros weren't actually removed. Perhaps you meant
"use of the macros can be removed" or similar. But it does seem they
can indeed be removed:

hp2:/usr/src/25> grep NODE_RECLAIM_ mm/*.[ch] include/linux/*.h
mm/internal.h:#define NODE_RECLAIM_NOSCAN -2
mm/internal.h:#define NODE_RECLAIM_FULL -1
mm/internal.h:#define NODE_RECLAIM_SOME 0
mm/internal.h:#define NODE_RECLAIM_SUCCESS 1
mm/vmscan.c:#define NODE_RECLAIM_PRIORITY 4
mm/vmscan.c: .priority = NODE_RECLAIM_PRIORITY,

(NODE_RECLAIM_PRIORITY looks like it belongs, but it's an unrelated
thing).

Let's not do an immediate resend to address this please - let's give
reviewers a week or so to do their thing.