Re: [PATCH 2/3] mm/page_alloc: move the kswapd node skip check into a helper

From: Chris Down

Date: Mon Nov 16 2026 - 16:31:57 EST


Hi Joshua,

Joshua Hahn writes:
+ /* Lockless check, a stale result only affects zone selection */
+ if (waitqueue_active(&zone->zone_pgdat->kswapd_wait))
+ return false;

Not a big deal, but now that the test is the other way round, this reads
backwards against "If kswapd is already active on a node" in the comment
above the function, because waitqueue_active() being true here means
kswapd is asleep on kswapd_wait. Maybe say something like that
kswapd is asleep, so nothing is reclaiming this? It needn't hold the patch
up though.

I've tested that this works well, so either way please feel free to add:

Reviewed-by: Chris Down <chris@xxxxxxxxxxxxxx>
Tested-by: Chris Down <chris@xxxxxxxxxxxxxx>

Thanks!

Chris