aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 593a11d8bc6b..dedadb4a779f 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3783,9 +3783,17 @@ retry_cpuset:
3783 /* 3783 /*
3784 * Restore the original nodemask if it was potentially replaced with 3784 * Restore the original nodemask if it was potentially replaced with
3785 * &cpuset_current_mems_allowed to optimize the fast-path attempt. 3785 * &cpuset_current_mems_allowed to optimize the fast-path attempt.
3786 * Also recalculate the starting point for the zonelist iterator or
3787 * we could end up iterating over non-eligible zones endlessly.
3786 */ 3788 */
3787 if (cpusets_enabled()) 3789 if (unlikely(ac.nodemask != nodemask)) {
3788 ac.nodemask = nodemask; 3790 ac.nodemask = nodemask;
3791 ac.preferred_zoneref = first_zones_zonelist(ac.zonelist,
3792 ac.high_zoneidx, ac.nodemask);
3793 if (!ac.preferred_zoneref->zone)
3794 goto no_zone;
3795 }
3796
3789 page = __alloc_pages_slowpath(alloc_mask, order, &ac); 3797 page = __alloc_pages_slowpath(alloc_mask, order, &ac);
3790 3798
3791no_zone: 3799no_zone: