*参照元 [#w4ed7ec6] #backlinks *説明 [#af22a5c8] -パス: [[linux-4.4.1/mm/page_alloc.c]] -FIXME: これは何? --説明 **引数 [#pf3dd2ed] -struct zone *zone -- --[[linux-4.4.1/zone]] -unsigned int order -- -int start_migratetype -- **返り値 [#n4eb8dc6] -struct page * -- --[[linux-4.4.1/page]] **参考 [#tf983043] *実装 [#jb379114] /* Remove an element from the buddy allocator from the fallback list */ static inline struct page * __rmqueue_fallback(struct zone *zone, unsigned int order, int start_migratetype) { struct free_area *area; unsigned int current_order; struct page *page; int fallback_mt; bool can_steal; - --[[linux-4.4.1/free_area]] --[[linux-4.4.1/page]] /* Find the largest possible block of pages in the other list */ for (current_order = MAX_ORDER-1; current_order >= order && current_order <= MAX_ORDER-1; --current_order) { area = &(zone->free_area[current_order]); fallback_mt = find_suitable_fallback(area, current_order, start_migratetype, false, &can_steal); if (fallback_mt == -1) continue; - --[[linux-4.4.1/find_suitable_fallback()]] page = list_entry(area->free_list[fallback_mt].next, struct page, lru); if (can_steal) steal_suitable_fallback(zone, page, start_migratetype); - --[[linux-4.4.1/list_entry()]] --[[linux-4.4.1/steal_suitable_fallback()]] /* Remove the page from the freelists */ area->nr_free--; list_del(&page->lru); rmv_page_order(page); - --[[linux-4.4.1/list_del()]] --[[linux-4.4.1/rmv_page_order()]] expand(zone, page, order, current_order, area, start_migratetype); - --[[linux-4.4.1/expand()]] /* * The pcppage_migratetype may differ from pageblock's * migratetype depending on the decisions in * find_suitable_fallback(). This is OK as long as it does not * differ for MIGRATE_CMA pageblocks. Those can be used as * fallback only via special __rmqueue_cma_fallback() function */ set_pcppage_migratetype(page, start_migratetype); - --[[linux-4.4.1/set_pcppage_migratetype()]] trace_mm_page_alloc_extfrag(page, order, current_order, start_migratetype, fallback_mt); return page; - --[[linux-4.4.1/trace_mm_page_alloc_extfrag()]] } return NULL; } *コメント [#t5857225]