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

From: Joshua Hahn

Date: Mon Nov 16 2026 - 17:59:32 EST


On Mon, Nov 16, 2026 at 01:31:50PM -0800, Chris Down wrote:
> 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.

Hi Chris,

Yeah, I agree that it's pretty confusing. I need to correct a typo in
3/3 anyways, and I think it would be best to spin up a new version in
this branch management transition time (instead of asking for a fixlet),
so I'll go ahead and spin up a v3 that addresses this.

> 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 a lot for yor time in reviewing and testing this series. It means
a lot to me! Have a great day Chris,
Joshua

> Thanks!
>
> Chris