mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
mm: fix check for reclaimable pages in PF_MEMALLOC reclaim throttling
PF_MEMALLOC direct reclaimers get throttled on a node when the sum of
all free pages in each zone fall below half the min watermark. During
the summation, we want to exclude zones that don't have reclaimables.
Checking the same pgdat over and over again doesn't make sense.
Fixes: 599d0c954f ("mm, vmscan: move LRU lists to node")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Johannes Weiner <[email protected]>
Acked-by: Hillf Danton <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Jia He <[email protected]>
Cc: Mel Gorman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
c73322d098
commit
d450abd81b
1 changed files with 4 additions and 2 deletions
|
|
@ -2835,8 +2835,10 @@ static bool allow_direct_reclaim(pg_data_t *pgdat)
|
|||
|
||||
for (i = 0; i <= ZONE_NORMAL; i++) {
|
||||
zone = &pgdat->node_zones[i];
|
||||
if (!managed_zone(zone) ||
|
||||
pgdat_reclaimable_pages(pgdat) == 0)
|
||||
if (!managed_zone(zone))
|
||||
continue;
|
||||
|
||||
if (!zone_reclaimable_pages(zone))
|
||||
continue;
|
||||
|
||||
pfmemalloc_reserve += min_wmark_pages(zone);
|
||||
|
|
|
|||
Loading…
Reference in a new issue