aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 1a3a893ef50e..8a8302711725 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1143,10 +1143,20 @@ again:
1143 1143
1144 /* Allocate more to the pcp list if necessary */ 1144 /* Allocate more to the pcp list if necessary */
1145 if (unlikely(&page->lru == &pcp->list)) { 1145 if (unlikely(&page->lru == &pcp->list)) {
1146 int get_one_page = 0;
1147
1146 pcp->count += rmqueue_bulk(zone, 0, 1148 pcp->count += rmqueue_bulk(zone, 0,
1147 pcp->batch, &pcp->list, 1149 pcp->batch, &pcp->list,
1148 migratetype, cold); 1150 migratetype, cold);
1149 page = list_entry(pcp->list.next, struct page, lru); 1151 list_for_each_entry(page, &pcp->list, lru) {
1152 if (get_pageblock_migratetype(page) !=
1153 MIGRATE_ISOLATE) {
1154 get_one_page = 1;
1155 break;
1156 }
1157 }
1158 if (!get_one_page)
1159 goto failed;
1150 } 1160 }
1151 1161
1152 list_del(&page->lru); 1162 list_del(&page->lru);