mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
cpusets: update mems allowed in page allocator
If all allowable memory is unreclaimable, it is possible to loop forever in the page allocator for ~__GFP_NORETRY allocations. During this time, it is also possible for a task's cpuset to expand its set of allowable nodes so that it now includes free memory. The cached copy of this set, current->mems_allowed, is stale, however, since there has not been a subsequent call to cpuset_update_task_memory_state(). The cached copy of the set of allowable nodes is now updated in the page allocator's slow path so the additional memory is available to get_page_from_freelist(). [[email protected]: add comment] Signed-off-by: David Rientjes <[email protected]> Cc: Paul Menage <[email protected]> Cc: Christoph Lameter <[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
f0f7e0dc73
commit
e33c3b5e17
1 changed files with 4 additions and 0 deletions
|
|
@ -1561,6 +1561,10 @@ nofail_alloc:
|
|||
|
||||
/* We now go into synchronous reclaim */
|
||||
cpuset_memory_pressure_bump();
|
||||
/*
|
||||
* The task's cpuset might have expanded its set of allowable nodes
|
||||
*/
|
||||
cpuset_update_task_memory_state();
|
||||
p->flags |= PF_MEMALLOC;
|
||||
reclaim_state.reclaimed_slab = 0;
|
||||
p->reclaim_state = &reclaim_state;
|
||||
|
|
|
|||
Loading…
Reference in a new issue