path: root/Documentation
diff options
authorMel Gorman <>2016-06-03 14:56:01 -0700
committerLinus Torvalds <>2016-06-03 16:02:57 -0700
commite46e7b77c9096eb2f4d6bcb9ca0b64c9338465ee (patch)
tree8c38e587733ee50aa021e03e8395274c5ce1fbb5 /Documentation
parent0d0bd89435d19faa3f2fd73f7ee11c64ac9304f4 (diff)
mm, page_alloc: recalculate the preferred zoneref if the context can ignore memory policies
The optimistic fast path may use cpuset_current_mems_allowed instead of of a NULL nodemask supplied by the caller for cpuset allocations. The preferred zone is calculated on this basis for statistic purposes and as a starting point in the zonelist iterator. However, if the context can ignore memory policies due to being atomic or being able to ignore watermarks then the starting point in the zonelist iterator is no longer correct. This patch resets the zonelist iterator in the allocator slowpath if the context can ignore memory policies. This will alter the zone used for statistics but only after it is known that it makes sense for that context. Resetting it before entering the slowpath would potentially allow an ALLOC_CPUSET allocation to be accounted for against the wrong zone. Note that while nodemask is not explicitly set to the original nodemask, it would only have been overwritten if cpuset_enabled() and it was reset before the slowpath was entered. Link: Fixes: c33d6c06f60f710 ("mm, page_alloc: avoid looking up the first zone in a zonelist twice") Signed-off-by: Mel Gorman <> Reported-by: Geert Uytterhoeven <> Tested-by: Geert Uytterhoeven <> Acked-by: Vlastimil Babka <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions