diff --git a/mm/vmscan.c b/mm/vmscan.c index e9d4c1f6d7bb975dbcf170afdb8964c20970f267..068d0bc24b8fdb7405aaa94bc02e58cbc3074023 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -641,7 +641,14 @@ unsigned long zone_reclaimable_pages(struct zone *zone) if (can_reclaim_anon_pages(NULL, zone_to_nid(zone), NULL)) nr += zone_page_state_snapshot(zone, NR_ZONE_INACTIVE_ANON) + zone_page_state_snapshot(zone, NR_ZONE_ACTIVE_ANON); - + /* + * If there are no reclaimable file-backed or anonymous pages, + * ensure zones with sufficient free pages are not skipped. + * This prevents zones like DMA32 from being ignored in reclaim + * scenarios where they can still help alleviate memory pressure. + */ + if (nr == 0) + nr = zone_page_state_snapshot(zone, NR_FREE_PAGES); return nr; }