Messages in this thread Patch in this message | | | Date | Fri, 24 Oct 2008 12:42:28 -0700 (PDT) | From | David Rientjes <> | Subject | [patch] 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().
Cc: Paul Menage <menage@google.com> Signed-off-by: David Rientjes <rientjes@google.com> --- mm/page_alloc.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1547,6 +1547,7 @@ nofail_alloc: /* We now go into synchronous reclaim */ cpuset_memory_pressure_bump(); + cpuset_update_task_memory_state(); p->flags |= PF_MEMALLOC; reclaim_state.reclaimed_slab = 0; p->reclaim_state = &reclaim_state;
| |