mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
[PATCH] vmscan: no zone_reclaim if PF_MALLOC is set
If the process has already set PF_MALLOC and is already using current->reclaim_state then do not try to reclaim memory from the zone. This is set by kswapd and/or synchrononous global reclaim which will not take it lightly if we zap the reclaim_state. Signed-off-by: Christoph Lameter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
04b857f74c
commit
a6bf527091
1 changed files with 2 additions and 1 deletions
|
|
@ -1883,7 +1883,8 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
|
|||
|
||||
if (!(gfp_mask & __GFP_WAIT) ||
|
||||
zone->all_unreclaimable ||
|
||||
atomic_read(&zone->reclaim_in_progress) > 0)
|
||||
atomic_read(&zone->reclaim_in_progress) > 0 ||
|
||||
(p->flags & PF_MEMALLOC))
|
||||
return 0;
|
||||
|
||||
node_id = zone->zone_pgdat->node_id;
|
||||
|
|
|
|||
Loading…
Reference in a new issue