Re: [PATCH v2 1/1] mm: reduce NODE_RECLAIM_xxx and change to enum
From: David Hildenbrand (Arm)
Date: Fri Jun 12 2026 - 10:57:20 EST
On 6/12/26 10:50, Petr Tesarik wrote:
> Change node_reclaim() to return an enum indicating whether any
> pages have been reclaimed, because that's all the information
> needed by the only caller, get_page_from_freelist().
>
> This leads to the following translation of the old macro
> identifiers to the new enum values:
>
> - NODE_RECLAIM_NOSCAN -> NODE_RECLAIM_NONE
> - NODE_RECLAIM_FULL -> NODE_RECLAIM_NONE
> - NODE_RECLAIM_SOME -> NODE_RECLAIM_SUCCESS
> - NODE_RECLAIM_SUCCESS -> NODE_RECLAIM_SUCCESS
Why not simply return the number of reclaimed pages (0 vs > 0)? I agree that a
bool is not good.
Or if that is not good enough (for some reason) return 0 (success) vs. -ENOENT?
--
Cheers,
David