The patch titled Subject: mm/page_alloc: simplify update of pgdat in wake_all_kswapds has been added to the -mm tree. Its filename is mm-page_alloc-simplify-update-of-pgdat-in-wake_all_kswapds.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-page_alloc-simplify-update-of-pgdat-in-wake_all_kswapds.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-page_alloc-simplify-update-of-pgdat-in-wake_all_kswapds.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Chen Wandun <chenwandun@xxxxxxxxxx> Subject: mm/page_alloc: simplify update of pgdat in wake_all_kswapds There is no need to update last_pgdat for each zone, only update last_pgdat when iterating the first zone of a node. Link: https://lkml.kernel.org/r/20220322115635.2708989-1-chenwandun@xxxxxxxxxx Signed-off-by: Chen Wandun <chenwandun@xxxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/page_alloc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/mm/page_alloc.c~mm-page_alloc-simplify-update-of-pgdat-in-wake_all_kswapds +++ a/mm/page_alloc.c @@ -4674,9 +4674,10 @@ static void wake_all_kswapds(unsigned in for_each_zone_zonelist_nodemask(zone, z, ac->zonelist, highest_zoneidx, ac->nodemask) { - if (last_pgdat != zone->zone_pgdat) + if (last_pgdat != zone->zone_pgdat) { wakeup_kswapd(zone, gfp_mask, order, highest_zoneidx); - last_pgdat = zone->zone_pgdat; + last_pgdat = zone->zone_pgdat; + } } } _ Patches currently in -mm which might be from chenwandun@xxxxxxxxxx are mm-page_alloc-simplify-update-of-pgdat-in-wake_all_kswapds.patch